Insert image or video at the caret position.
When there is a selection, the selected block is deleted and image or video is inserted.
Inserted images or videos are uploaded to the server.
Related settings : Setting Import API and Upload API
Parameters:
Name | Type | Description |
---|---|---|
actionName | String | 'insertDrawingObject' image and video inserting API |
files | File[] | [file, file ...]: Array including file object |
type | String | Type of the file to insert ('Image', 'Video') |
Example:
editor.execCommand('insertDrawingObject', [file], 'Image'); editor.execCommand('insertDrawingObject', [file], 'Video');