캐럿이 위치한 곳에 이미지, 비디오를 삽입합니다.
셀렉션 상태인 경우 셀렉션된 구간을 제거 후 이미지, 비디오를 삽입합니다.
삽입한 이미지, 비디오는 서버로 업로드 됩니다.
관련 설정 보기: Import API 및 Upload API 설정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:
Code Block | ||||
---|---|---|---|---|
| ||||
editor.execCommand('insertDrawingObject', [file], 'Image'); editor.execCommand('insertDrawingObject', [file], 'Video'); |
...