Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

캐럿이 위치한 곳에 이미지, 비디오를 삽입합니다.

셀렉션 상태인 경우 셀렉션된 구간을 제거 후 이미지, 비디오를 삽입합니다.

삽입한 이미지, 비디오는 서버로 업로드 됩니다.

관련 설정 보기: 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:

NameTypeDescription
actionNameString액션 이름 'insertDrawingObject' image and video inserting API
filesFile[]

업로드할 이미지/비디오[file, file ...]: Array including file object

typeString파일 타입 Type of the file to insert ('Image', 'Video')


Example:

Code Block
languagejs
themeEmacs
editor.execCommand('insertDrawingObject', [file], 'Image');
editor.execCommand('insertDrawingObject', [file], 'Video');

...