UI

UI-control commands executed via editor.execCommand — popups, dim layers, loading progress, view toggles, etc.

Commands


command - blockUI

Disables every UI feature so the user can't interact. Pass exceptUINames to whitelist specific features that stay enabled. See command - unblockUI.

NameTypeDescription
actionNamestringAction name
[exceptUINames]arrayFeature 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.

NameTypeDescription
actionNamestringAction name
exceptPopupNamestringName 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.

NameTypeDescription
actionNamestringAction name
[fullscreen]booleanWhether 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.

NameTypeDescription
actionNamestringAction name
editor.execCommand('hideLoadingProgress');

command - showDimLayer

Shows a dim layer that blocks editor (or fullscreen) interaction. Pair with command - hideDimLayer.

NameTypeDescription
actionNamestringAction name
[fullscreen]booleanWhether 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.

NameTypeDescription
actionNamestringAction name
[message]stringMessage to display
editor.execCommand('showLoadingProgress');
editor.execCommand('showLoadingProgress', 'Loading...');

command - toggleCodeView

Toggles between source-code view and the normal edit mode.

NameTypeDescription
actionNamestringAction name
editor.execCommand('toggleCodeView');

command - toggleDivGuide (deprecated)

Deprecated. Use command - toggleGuide instead.

Toggles the layer-outline guide.

editor.execCommand('toggleDivGuide');

command - toggleDrawMode

Toggles draw mode (used for inserting shapes / drawing layers).

NameTypeDescription
actionNamestringAction name
editor.execCommand('toggleDrawMode');

command - toggleFullScreen

Toggles fullscreen mode for the editor.

NameTypeDescription
actionNamestringAction name
editor.execCommand('toggleFullScreen');

command - toggleGuide

Toggles the editing guide (visual outlines for shapes and layers).

NameTypeDescription
actionNamestringAction name
editor.execCommand('toggleGuide');

command - toggleMenu

Shows / hides the menu bar.

NameTypeDescription
actionNamestringAction name
editor.execCommand('toggleMenu');

command - togglePreview

Toggles preview mode.

NameTypeDescription
actionNamestringAction name
editor.execCommand('togglePreview');

command - toggleRuler

Shows / hides the ruler.

NameTypeDescription
actionNamestringAction name
editor.execCommand('toggleRuler');

command - unblockUI

Re-enables UI features previously disabled by command - blockUI.

NameTypeDescription
actionNamestringAction name
editor.execCommand('unblockUI');