UI
editor.execCommand를 통해 실행되는 UI 제어 명령어 — 팝업, 딤 레이어, 로딩 표시, 보기 전환 등.
명령어
command - blockUIcommand - hideAllPopupcommand - hideDimLayercommand - hideLoadingProgresscommand - showDimLayercommand - showLoadingProgresscommand - toggleCodeViewcommand - toggleDivGuide(deprecated)command - toggleDrawModecommand - toggleFullScreencommand - toggleGuidecommand - toggleMenucommand - togglePreviewcommand - toggleRulercommand - unblockUI
command - blockUI
모든 UI 기능을 비활성화하여 사용자가 상호작용할 수 없게 합니다. 활성화된 상태로 유지할 특정 기능을 허용하려면 exceptUINames를 전달합니다. command - unblockUI를 참고합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
[exceptUINames] | array | 활성화된 상태로 유지할 기능 이름 |
editor.execCommand('blockUI');
editor.execCommand('blockUI', ['bold', 'italic']); // everything disabled except 'bold' and 'italic'
command - hideAllPopup
모든 열려 있는 팝업과 풍선팝업을 숨깁니다(다이얼로그에는 영향을 주지 않습니다). 하나의 팝업/풍선팝업만 계속 표시되도록 하려면 이름을 전달합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
exceptPopupName | string | 표시 상태를 유지할 팝업/풍선팝업의 이름 |
editor.execCommand('hideAllPopup'); // hide all popups and balloons
editor.execCommand('hideAllPopup', 'colorPicker'); // hide everything except colorPicker
command - hideDimLayer
에디터 상호작용을 차단하는 딤 레이어를 숨깁니다. command - showDimLayer를 참고합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
[fullscreen] | boolean | 전체 화면 딤 레이어도 숨길지 여부 |
editor.execCommand('hideDimLayer'); // hide just the editor dim layer
editor.execCommand('hideDimLayer', true); // hide the fullscreen dim layer too
command - hideLoadingProgress
로딩 진행 표시기를 숨깁니다. command - showLoadingProgress를 참고합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('hideLoadingProgress');
command - showDimLayer
에디터(또는 전체 화면) 상호작용을 차단하는 딤 레이어를 표시합니다. command - hideDimLayer와 함께 사용합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
[fullscreen] | boolean | 전체 뷰포트를 덮을지 여부 |
editor.execCommand('showDimLayer');
editor.execCommand('showDimLayer', true);
command - showLoadingProgress
로딩 진행 표시기를 표시하며, 선택적으로 메시지를 함께 표시할 수 있습니다. command - hideLoadingProgress를 참고합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
[message] | string | 표시할 메시지 |
editor.execCommand('showLoadingProgress');
editor.execCommand('showLoadingProgress', 'Loading...');
command - toggleCodeView
소스 코드 보기와 일반 편집 모드 간에 전환합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('toggleCodeView');
command - toggleDivGuide (더 이상 사용되지 않음)
더 이상 사용되지 않습니다. 대신
command - toggleGuide를 사용합니다.
레이어 윤곽선 가이드를 전환합니다.
editor.execCommand('toggleDivGuide');
command - toggleDrawMode
2.8.0 버전부터 지원합니다.
그리기 모드를 전환합니다(shape 삽입 / 레이어 그리기에 사용).
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
uiName | string | 그리기 명령을 시작한 UI의 이름 |
callback | function | 그리기가 완료되면 호출되는 콜백 함수입니다. 그려진 영역 rect (x, y, width, height)를 전달받습니다. |
editor.execCommand('toggleDrawMode', 'customUIName', function (rect) {
var x = rect.x;
var y = rect.y;
var width = rect.width;
var height = rect.height;
console.log(x, y, width, height);
});
command - toggleFullScreen
에디터의 전체 화면 모드를 전환합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('toggleFullScreen');
command - toggleGuide
편집 가이드(도형 및 레이어에 대한 시각적 윤곽선)를 전환합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('toggleGuide');
command - toggleMenu
지정된 이름의 메뉴를 열거나 닫습니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
menuName | string | 메뉴 이름 (예: 'file') |
editor.execCommand('toggleMenu', 'file');
command - togglePreview
미리보기 모드를 전환합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('togglePreview');
command - toggleRuler
눈금자를 표시하거나 숨깁니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('toggleRuler');
command - unblockUI
이전에 command - blockUI에 의해 비활성화된 UI 기능을 다시 활성화합니다.
| 이름 | 타입 | 설명 |
|---|---|---|
actionName | string | 명령 이름 |
editor.execCommand('unblockUI');