Page tree
Skip to end of metadata
Go to start of metadata

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:

NameTypeDescription
actionNameString'insertDrawingObject' image and video inserting API
filesFile[]

[file, file ...]: Array including file object

typeStringType of the file to insert ('Image', 'Video')


Example:

editor.execCommand('insertDrawingObject', [file], 'Image');
editor.execCommand('insertDrawingObject', [file], 'Video');
  • No labels