The ButtonImage class inserts an image to the content.
On input change, reads the chosen file and fires an event
beforeImageAdd with the image which will be added
to the content. The image file will be passed in the
If any of the listeners returns
false or cancels the event, the image won't be added to the content.
Otherwise, an event
imageAdd will be fired with the inserted element into the editable area.
The passed params will be:
el- the created img element
file- the original image file from the input element
Simulates click on the input element. This will open browser's native file open dialog.
The received click event on the button.
Lifecycle. Renders the UI of the button.
The content which should be rendered.
The editor instance where the component is being used.
The name which will be used as an alias of the button in the configuration.
The label that should be used for accessibility purposes.
The tabIndex of the button in its toolbar current state. A value other than -1 means that the button has focus and is the active element.
Fired before adding images to the editor.
Array of image files
Fired when an image is being added to the editor successfully.
The created image with src as Data URI
The image file