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.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.module: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 called with the DOM root Rect and the dialog Rect as arguments. It should return the coordinates of the dialog's position.
Learn more about available positions.
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.