DialogDefinition
The definition that describes a dialog window and its content. Passed to the show method.
Properties
actionButtons : Array<DialogActionButtonDefinition> | undefinedmodule:ui/dialog/dialog~DialogDefinition#actionButtonsThe action buttons displayed in the dialog's footer.
className : string | undefinedmodule:ui/dialog/dialog~DialogDefinition#classNameAn additional CSS class set on the outermost (
.ck.ck-dialog) container element allowing for visual customization.module:ui/dialog/dialog~DialogDefinition#contentThe content of the dialog. It can be a single
Viewor an array of views.getRootName : () => ( string | null ) | undefinedmodule:ui/dialog/dialog~DialogDefinition#getRootNameA callback executed whenever the dialog is about to show up that returns the DOM root name that the dialog should be positioned relative to.
If not set, the dialog will be positioned relative to the DOM root the model selection is anchored to.
hasCloseButton : boolean | undefinedmodule:ui/dialog/dialog~DialogDefinition#hasCloseButtonA flag indicating whether the dialog should have a close button in the header.
trueby default. Works whentitleis also set and the header is displayed.Note: If you hide the close button, make sure that the dialog can be closed in another way.
icon : string | undefinedmodule:ui/dialog/dialog~DialogDefinition#iconid : stringmodule:ui/dialog/dialog~DialogDefinition#idA unique identifier of the dialog. It allows for distinguishing between different dialogs and their visibility. For instance, when open, the ID of the currently visible dialog is stored in
id.The
idis also passed along theDialogShowEventandDialogHideEventevents.isModal : boolean | undefinedmodule:ui/dialog/dialog~DialogDefinition#isModalWhen set to
true, the dialog will become a modal, that is, it will block the UI until it is closed.keystrokeHandlerOptions : KeystrokeHandlerOptions | undefinedmodule:ui/dialog/dialog~DialogDefinition#keystrokeHandlerOptionsOptions that will be passed to the keystroke handler of the dialog view.
See KeystrokeHandlerOptions to learn more about the available options.
module:ui/dialog/dialog~DialogDefinition#onHideA callback called when the dialog hides with a
lowpriority. It allows for cleaning up (for example, resetting) the dialog'scontent.module:ui/dialog/dialog~DialogDefinition#onShowA callback called when the dialog shows up with a
lowpriority. It allows for setting up the dialog'scontent.position : 'screen-center' | 'editor-center' | 'editor-top-side' | 'editor-top-center' | 'editor-bottom-center' | 'editor-above-center' | 'editor-below-center' | DialogPositionCallback | null | undefinedmodule:ui/dialog/dialog~DialogDefinition#positionAvailable dialog positions. By default
DialogViewPosition.EDITOR_CENTERis used for non-modals andDialogViewPosition.SCREEN_CENTERfor modals.If set to a function, it will be fed dialog and DOM root geometry as arguments and should return the coordinates of the dialog's position.
- Learn more about available positions.
- Learn more about which editor root the dialog is positioned relative to in the
getRootNamesection.
title : string | undefinedmodule:ui/dialog/dialog~DialogDefinition#titleA title displayed in the dialogs's header. It also works as an accessible name of the dialog used by assistive technologies.
When not set, the header is not displayed. Affects
iconandhasCloseButton.