UI
UI-control commands executed via editor.execCommand — popups, dim layers, loading progress, view toggles, etc.
Commands
command - blockUIcommand - hideAllPopupcommand - hideDimLayercommand - hideLoadingProgresscommand - showDimLayercommand - showLoadingProgresscommand - toggleCodeViewcommand - toggleDivGuide(deprecated)command - toggleDrawModecommand - toggleFullScreencommand - toggleGuidecommand - toggleMenucommand - togglePreviewcommand - toggleRulercommand - unblockUI
command - blockUI
Disables every UI feature so the user can't interact. Pass exceptUINames to whitelist specific features that stay enabled. See command - unblockUI.
| Name | Type | Description |
|---|---|---|
actionName | string | Action name |
[exceptUINames] | array | Feature names to keep enabled |
editor.execCommand('blockUI');
editor.execCommand('blockUI', ['bold', 'italic']); // everything disabled except 'bold' and 'italic'
command - hideAllPopup
Hides every open popup and balloon (dialogs are not affected). Pass a name to whitelist one popup/balloon that should stay visible.
| Name | Type | Description |
|---|---|---|
actionName | string | Action name |
exceptPopupName | string | Name of the popup/balloon to keep visible |
editor.execCommand('hideAllPopup'); // hide all popups and balloons
editor.execCommand('hideAllPopup', 'colorPicker'); // hide everything except colorPicker
command - hideDimLayer
Hides the dim layer that blocks editor interaction. See command - showDimLayer.
| Name | Type | Description |
|---|---|---|
actionName | string | Action name |
[fullscreen] | boolean | Whether to also hide the fullscreen dim layer |
editor.execCommand('hideDimLayer'); // hide just the editor dim layer
editor.execCommand('hideDimLayer', true); // hide the fullscreen dim layer too
command - hideLoadingProgress
Hides the loading progress indicator. See command - showLoadingProgress.
| Name | Type | Description |
|---|---|---|
actionName | string | Action name |
editor.execCommand('hideLoadingProgress');
command - showDimLayer
Shows a dim layer that blocks editor (or fullscreen) interaction. Pair with command - hideDimLayer.
| Name | Type | Description |
|---|---|---|
actionName | string | Action name |
[fullscreen] | boolean | Whether to cover the entire viewport |
editor.execCommand('showDimLayer');
editor.execCommand('showDimLayer', true);
command - showLoadingProgress
Shows the loading progress indicator, optionally with a message. See command - hideLoadingProgress.
| Name | Type | Description |
|---|---|---|
actionName | string | Action name |
[message] | string | Message to display |
editor.execCommand('showLoadingProgress');
editor.execCommand('showLoadingProgress', 'Loading...');
command - toggleCodeView
Toggles between source-code view and the normal edit mode.
| Name | Type | Description |
|---|---|---|
actionName | string | Action name |
editor.execCommand('toggleCodeView');
command - toggleDivGuide (deprecated)
Deprecated. Use
command - toggleGuideinstead.
Toggles the layer-outline guide.
editor.execCommand('toggleDivGuide');
command - toggleDrawMode
Toggles draw mode (used for inserting shapes / drawing layers).
| Name | Type | Description |
|---|---|---|
actionName | string | Action name |
editor.execCommand('toggleDrawMode');
command - toggleFullScreen
Toggles fullscreen mode for the editor.
| Name | Type | Description |
|---|---|---|
actionName | string | Action name |
editor.execCommand('toggleFullScreen');
command - toggleGuide
Toggles the editing guide (visual outlines for shapes and layers).
| Name | Type | Description |
|---|---|---|
actionName | string | Action name |
editor.execCommand('toggleGuide');
command - toggleMenu
Shows / hides the menu bar.
| Name | Type | Description |
|---|---|---|
actionName | string | Action name |
editor.execCommand('toggleMenu');
command - togglePreview
Toggles preview mode.
| Name | Type | Description |
|---|---|---|
actionName | string | Action name |
editor.execCommand('togglePreview');
command - toggleRuler
Shows / hides the ruler.
| Name | Type | Description |
|---|---|---|
actionName | string | Action name |
editor.execCommand('toggleRuler');
command - unblockUI
Re-enables UI features previously disabled by command - blockUI.
| Name | Type | Description |
|---|---|---|
actionName | string | Action name |
editor.execCommand('unblockUI');