Adds UI elements to the specified destination.
[Deprecated] The callback is not required anymore and should not be used. Pass null instead.
The destination to add the UI to.
Rest
...args: MEUIBase[]A list of UI items to add to the destination.
Removes all custom UI elements from the editor interface.
The destination to clear.
Method for custom fields to set the UI for the field popup dialog. Up to 3 individual tabs can be used. Each tab can have a custom UI item to display.
Removes UI elements from the editor interface.
[Deprecated] The callback is not required anymore and should not be used. Pass null instead.
Rest
...args: MEUIBase[]The list of UI items to remove.
Returns the currently selected album in the gallery control.
The currently selected album.
Shows a dialog for the user to enter a text value.
The message to display on the dialog.
The title of the dialog.
The default value to display in the input field.
The callback will be triggered once the user closes the dialog. If the user clicked OK, the success parameter will be true, otherwise if he canceled it will be false.
Adds one or more css classes (separated by space) to the dialog - used for custom styling.
Shows a dialog for the user to enter a number value.
The message to display on the dialog.
The title of the dialog.
The default value to display in the input field.
The minimum value allowed.
The maximum value allowed.
The step size to use for the input field.
The callback will be triggered once the user closes the dialog. If the user clicked OK, the success parameter will be true, otherwise if he canceled it will be false.
Adds one or more css classes (separated by space) to the dialog - used for custom styling.
Reloads the UI elements passed as parameters - so that the script version is updated to the current version. Note that if you have callbacks configured for your UI elements, they reload automatically when the callbacks are triggered.
[Deprecated] The callback is not required anymore and should not be used. Pass null instead.
Rest
...args: MEUIBase[]The list of UI items to update.
Removes a previously added rectangle from the canvas.
The identifier of the rectangle to remove. See the return value of ShowRectAreaOnPage.
Sets a new CSS rule or updates an existing rule for the editor directly. Normally CSS override can be used to change the appearance of the editor, but this function allows to set a new rule directly via scripting. This function is used to set multiple CSS attributes with their values.
The name of the CSS rule to set.
The object with the CSS attributes and values to set.
Editor.UI.SetCssClass(".exampleRecordEntry", {
"display": "inline-block",
"color": "Black",
"font-weight": "bold",
"padding-left": "10px",
"cursor": "pointer"
});
Sets a new CSS rule or updates an existing rule for the editor directly. Normally CSS override can be used to change the appearance of the editor, but this function allows to set a new rule directly via scripting. This function is used to set a single CSS attribute with a given value.
The name of the CSS rule to set.
The CSS attribute to set.
The CSS value to set.
setCssRule(".galleryWrapper .galleryItem, .galleryWrapper .spinnerimage", "width", size + "%");
Set the default album for the current job. This will be loaded as default and will receive all new media items.
The media album or its ID to set as the new default.
Sets the UI data for a specific target. This can be used to configure individual elements of the editor UI.
The target to set the data for.
The value to set. The type and format depends on the target. See EditorUiDataFlag for details.
Adjusts the currently selected album in the gallery control.
The media album or its ID.
Shows a dialog for the user to confirm a choice. The user has to click either a 'yes' or 'no' button.
The message to display on the dialog.
The title of the dialog.
Optional
buttonYesText: stringThe text to display on the 'yes' button. Default is 'Yes'.
Optional
buttonNoText: stringThe text to display on the 'no' button. Default is 'No'.
Optional
yesCallback: (() => void)The callback will be triggered if the user clicked the 'yes' button.
Optional
noCallback: (() => void)The callback will be triggered if the user clicked the 'no' button.
Shows a modal popup dialog within the editor.
The title of the dialog.
The UI item to display in the dialog. Usually a layout item like MEUIStackLayout, but can be any UI item of type MEUIBase.
The actions to display at the bottom of the dialog. Can be any number of buttons.
Optional
closeCallback: (() => void)The callback will be triggered when the dialog is closed.
Optional
callback: DialogCallbackThe callback will be triggered when the dialog is ready. The dialog is is passed as parameter to the callback which is needed to further interact with it.
Optional
windowClass: stringAn optional CSS class to add to the dialog window.
Displays a dialog showing a specific editable content item identified by id.
The id of the editable content to display.
Optional
callback: (() => void)The callback is triggered when the dialog is closed.
Optional
options: Record<string, any>Optional object with options to configure the dialog.
Shows or hides a specific element of the editor UI. See EditorUiVisibilityFlag for details.
The target to show or hide.
Flag to indicate if the target should be visible or not.
Displays an error message to the user. The message will not disappear automatically, but the user can close it via the close icon or the optional button. Will also be logged to the console.
The error message text to display.
Optional
buttonText: stringAn optional button showing on the notification. If not set, the notification will have no button.
Optional
callback: (() => void)The callback will be triggered if the user clicked the button.
Displays a custom help message. For this to work, the help settings have to be enabled to display context help in the per product configuration. The field is optional and will display the help message for the field if it is set. If not, the help message will be displayed for the entire page if the setting to show once per field is also disabled.
The optional field or its ID to display the help message for.
The help text to display.
Helper method to display a mapping dialog to the user to map a list of items to a list of values. An existing mapping can be passed which will be used to preload the data. If no mapping is set, it will automap the items to the values if possible via AutoMap. The user can then change the mapping. Based on the parameters, the user is able to link a static value instead of a mapped value.
The message to display on the dialog.
The title of the dialog.
The placeholder list of items to map as the keys.
The values are the list of values available for mapping.
The initial mapping data to load. Can be null to trigger an initial automap.
Flag to indicate if the user should be able to link a static value instead of a mapped value.
The callback will be triggered once the user closes the dialog. If the user clicked OK, the mapping will be passed as the parameter, otherwise if he canceled it will be null.
Optional
cssClasses: stringAdds one or more css classes (separated by space) to the dialog - used for custom styling.
Optional
options: MappingDialogOptionsOptional object with options to configure the dialog.
Displays a message to the user. By default this will be an information message, but additional options are available. The message will disappear automatically after a short time if no button is set. Will also be logged to the console.
The message to display in the notification.
Optional
type: NotificationTypeThe type of the notification. This will impact the style of the notification as well as the behaviour. Defaults to Info.
Optional
buttonText: stringAn optional button showing on the notification. If not set, the notification will have no button.
Optional
callback: (() => void)The callback will be triggered if the user clicked the button.
Optional
permanent: booleanFlag to indicate if the notification should be permanent and not disappear automatically. Default is false.
Optional
forbidClose: booleanFlag to indicate if the notification should not be closable by the user. Default is false. Note that this will not prevent the notification from disappearing automatically. If also permanent is set to true, the notification will never disappear unless a button is used and clicked.
Optional
timeout: numberThe timeout in milliseconds after which the notification should disappear automatically. Default depends on the type. Is ignored if permanent is set to true or a button is configured.
The unique message identifier. Currently this cannot be used for anything, but it is returned for future use.
Shows a waiting overlay over the entire editor. Used to indicate that the editor is busy and to avoid user interaction. If the editori s already showing an overlay, the message and/or other options will be updated.
The message to show in the overlay.
Optional
showTransparent: booleanIf true, the overlay will be transparent, otherwise it will be opaque. Default is false.
Optional
showUi: booleanYou can add custom UI to the overlay. If that should be visible, set this to true. Default is false.
Optional
showFast: booleanThere is a transition to show the overlay (fade in). If you want to skip that, set this to true and the overlay will show immediately. Default is false.
Helper function to display the current progress of a long running operation - identified via the DocumentUpdateHandler - in the overlay. Does not automatically update the message over time, but can be called again with the same object to update the message.
The message prefix to show in the overlay. This will be separated then by the actual progress via a colon.
The update handler to use to get the current progress.
Optional
showTransparent: booleanIf true, the overlay will be transparent, otherwise it will be opaque. Default is false.
Optional
showUi: booleanYou can add custom UI to the overlay. If that should be visible, set this to true. Default is false.
Optional
showFast: booleanThere is a transition to show the overlay (fade in). If you want to skip that, set this to true and the overlay will show immediately. Default is false.
Adds a rectangular area on the canvas to highlight and interact with a special area. The rectangle will be added to the current page and switching pages will remove the rectangle as will do a call to Refresh. This will return a unique identifier which can be used to remove the rectangle via scripting.
The rectanglular area to cover in points on the canvas.
Optional
normalFormat: ShapeFormatOptionOptional format to use for the rectangle. If not set, this will not be drawn. This is used when the mouse is not over the rectangle.
Optional
hoverFormat: ShapeFormatOptionOptional hover format to use for the rectangle. If not set, this will not be drawn. This is used when the mouse is over the rectangle and only active if we have a callback defined.
Optional
callback: (() => void)Optional callback which will be triggered when the rectangle is clicked.
Optional
rotation: numberOptional rotation of the rectangle in degrees. Default is 0. Rotation is around the top left corner of the rectangle.
The identifier of the rectangle which can be used to remove it later.
Displays a warning message to the user. The warning message will disappear automatically after a short time if no button is set. Will also be logged to the console.
The message to show.
Optional
buttonText: stringAn optional button showing on the notification. If not set, the notification will have no button.
Optional
callback: (() => void)The callback will be triggered if the user clicked the button.
Update UI elements passed as parameters.
[Deprecated] The callback is not required anymore and should not be used. Pass null instead.
Flag to check if children of the UI element should be updated as well. Default is false.
Rest
...args: MEUIBase[]A list of UI items to update.
Updates an existing dialog
The id of the dialog to update.
The new title of the dialog if specified. If null the title will not be changed.
The new actions to display at the bottom of the dialog. Can be any number of buttons. Will always be updated.
Optional
closeCallback: (() => void)The new callback will be triggered when the dialog is closed.
Generated using TypeDoc
Interact with the user interface of the editor and generate custom UI.