ckeditor5-elements / ElementClickableDefinition
Interface: ElementClickableDefinition
Makes the elements that match element react to clicks.
Properties
callback
ts
callback: (element, editor, domEvent) => void;Called with the element that was clicked, the editor, and the DOM event.
Parameters
| Parameter | Type |
|---|---|
element | ModelElement |
editor | Editor |
domEvent | MouseEvent |
Returns
void
element
ts
element: ElementMatcher;The elements the definition is for: the name of a model element (e.g. 'imageBlock'), or a function that returns whether it is for the given element (e.g. element => element.hasAttribute('linkHref')).
event?
ts
event?: ElementClickableEvent;The mouse event: 'click' (the default) or 'dblclick'.