SELECTION
캐럿 이동, 선택 영역 확장, 선택 영역 제어 명령은 editor.execCommand를 통해 실행됩니다.
명령어
command - blurImecommand - disableImecommand - documentEndcommand - documentStartcommand - downcommand - enableImecommand - extendColcommand - extendDocumentEndcommand - extendDocumentStartcommand - extendDowncommand - extendLeftcommand - extendLineEndcommand - extendLineStartcommand - extendNextParagraphStartcommand - extendNextWordcommand - extendPageDowncommand - extendPageUpcommand - extendPreviousParagraphStartcommand - extendPreviousWordcommand - extendRightcommand - extendRowcommand - extendTablecommand - extendUpcommand - focusImecommand - leftcommand - lineEndcommand - lineStartcommand - nextParagraphStartcommand - nextWordcommand - pageDowncommand - pageUpcommand - previousParagraphStartcommand - previousWordcommand - rightcommand - selectAllcommand - selectParagraphcommand - selectWordcommand - setCaretcommand - setCaretByIdcommand - setSelectioncommand - setSelectionByHTMLElementcommand - up
command - blurIme
에디터에서 포커스를 제거합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('blurIme');
command - disableIme
텍스트 입력을 비활성화합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('disableIme');
command - documentEnd
캐럿을 문서의 끝으로 이동합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('documentEnd');
command - documentStart
캐럿을 문서의 시작으로 이동합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('documentStart');
command - down
캐럿을 아래로 이동합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('down');
command - enableIme
텍스트 입력을 활성화합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('enableIme');
command - extendCol
tableId로 식별된 표에서 지정된 인덱스의 열을 선택합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
tableId | string | 표 ID |
index | number | 열 인덱스 |
isExtend | boolean | 기존 선택 영역을 확장할지 여부 |
editor.execCommand('extendCol', 'table_id', 0, false);
command - extendDocumentEnd
선택 영역을 문서의 끝까지 확장합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('extendDocumentEnd');
command - extendDocumentStart
선택 영역을 문서의 시작까지 확장합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('extendDocumentStart');
command - extendDown
선택 영역을 아래로 확장합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('extendDown');
command - extendLeft
선택 영역을 왼쪽으로 한 글자 확장합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('extendLeft');
command - extendLineEnd
선택 영역을 줄의 끝까지 확장합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('extendLineEnd');
command - extendLineStart
선택 영역을 줄의 시작까지 확장합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('extendLineStart');
command - extendNextParagraphStart
선택 영역을 다음 문단의 시작까지 확장합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('extendNextParagraphStart');
command - extendNextWord
선택 영역을 다음 단어의 시작까지 확장합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('extendNextWord');
command - extendPageDown
선택 영역을 한 화면 아래로 확장합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('extendPageDown');
command - extendPageUp
선택 영역을 한 화면 위로 확장합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('extendPageUp');
command - extendPreviousParagraphStart
선택 영역을 이전 문단의 시작까지 확장합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('extendPreviousParagraphStart');
command - extendPreviousWord
선택 영역을 이전 단어의 시작까지 확장합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('extendPreviousWord');
command - extendRight
선택 영역을 오른쪽으로 한 글자 확장합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('extendRight');
command - extendRow
tableId로 식별된 표에서 지정된 인덱스의 행을 선택합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
tableId | string | 표 ID |
index | number | 행 인덱스 |
isExtend | boolean | 기존 선택 영역을 확장할지 여부 |
editor.execCommand('extendRow', 'table_id', 0, false);
command - extendTable
tableId로 식별된 전체 표를 선택합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
tableId | string | 표 ID |
editor.execCommand('extendTable', 'table_id');
command - extendUp
선택 영역을 위쪽으로 확장합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('extendUp');
command - focusIme
포커스를 에디터로 이동합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
preventScroll | boolean | 선택 영역으로 스크롤하는 것을 건너뛸지 여부 (기본값 false) |
editor.execCommand('focusIme', false); // scroll to the selection
editor.execCommand('focusIme', true); // do not scroll
command - left
캐럿을 한 글자 왼쪽으로 이동합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('left');
command - lineEnd
캐럿을 줄의 끝으로 이동합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('lineEnd');
command - lineStart
캐럿을 줄의 시작으로 이동합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('lineStart');
command - nextParagraphStart
캐럿을 다음 문단의 시작으로 이동합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('nextParagraphStart');
command - nextWord
캐럿을 다음 단어의 시작으로 이동합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('nextWord');
command - pageDown
캐럿을 한 화면 아래로 이동합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('pageDown');
command - pageUp
캐럿을 한 화면 위로 이동합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('pageUp');
command - previousParagraphStart
캐럿을 이전 문단의 시작으로 이동합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('previousParagraphStart');
command - previousWord
캐럿을 이전 단어의 시작으로 이동합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('previousWord');
command - right
캐럿을 오른쪽으로 한 글자 이동합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('right');
command - selectAll
문서 전체를 선택합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('selectAll');
command - selectParagraph
지정된 화면 좌표에 있는 문단을 선택합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
x | number | x 좌표 (화면) |
y | number | y 좌표 (화면) |
editor.execCommand('selectParagraph', 100, 100);
command - selectWord
지정된 화면 좌표에 있는 단어를 선택합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
x | number | x 좌표 (화면) |
y | number | y 좌표 (화면) |
editor.execCommand('selectWord', 100, 100);
command - setCaret
캐럿을 지정된 화면 좌표로 이동합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
x | number | x 좌표 (화면) |
y | number | y 좌표 (화면) |
editor.execCommand('setCaret', 100, 100);
command - setCaretById
id로 식별된 문단의 지정한 오프셋으로 캐럿을 이동합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
id | string | 문단 ID |
offset | number | 문단 오프셋 |
editor.execCommand('setCaretById', 'paragraph_id', 0);
command - setSelection
캐럿을 지정한 좌표로 이동하거나 선택 영역을 확장합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
x | number | x 좌표 (화면) |
y | number | y 좌표 (화면) |
isExtend | boolean | 기존 선택 영역을 확장할지 여부 (기본값 false) |
isFinish | boolean | 선택이 완료되었는지 여부 (기본값 false). 완료되면 스크롤이 조정됩니다. |
editor.execCommand('setSelection', 100, 100, false, true);
command - setSelectionByHTMLElement
주어진 HTML 요소를 선택합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
htmlElement | HTMLElement | 선택할 HTML 요소 |
editor.execCommand('setSelectionByHTMLElement', document.getElementById('test'));
command - up
캐럿을 위로 이동합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('up');