DialogDefinition (ui/dialog)
@ckeditor/ckeditor5-ui/src/dialog/dialog
The definition that describes a dialog window and its content. Passed to the show
method.
Filtering
Properties
-
actionButtons : Array<DialogActionButtonDefinition> | undefined
module:ui/dialog/dialog~DialogDefinition#actionButtons
The action buttons displayed in the dialog's footer.
-
className : string | undefined
module:ui/dialog/dialog~DialogDefinition#className
An additional CSS class set on the outermost (
.ck.ck-dialog
) container element allowing for visual customization. -
content : View<HTMLElement> | Array<View<HTMLElement>> | undefined
module:ui/dialog/dialog~DialogDefinition#content
The content of the dialog. It can be a single
View
or an array of views. -
hasCloseButton : boolean | undefined
module:ui/dialog/dialog~DialogDefinition#hasCloseButton
A flag indicating whether the dialog should have a close button in the header.
true
by default. Works whentitle
is 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 | undefined
module:ui/dialog/dialog~DialogDefinition#icon
-
id : string
module:ui/dialog/dialog~DialogDefinition#id
A 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
id
is also passed along theDialogShowEvent
andDialogHideEvent
events. -
isModal : boolean | undefined
module:ui/dialog/dialog~DialogDefinition#isModal
When set to
true
, the dialog will become a modal, that is, it will block the UI until it is closed. -
A callback called when the dialog hides with a
low
priority. It allows for cleaning up (for example, resetting) the dialog'scontent
. -
A callback called when the dialog shows up with a
low
priority. 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' | undefined
module:ui/dialog/dialog~DialogDefinition#position
Available dialog positions. By default
DialogViewPosition.EDITOR_CENTER
is used for non-modals andDialogViewPosition.SCREEN_CENTER
for modals.Learn more about available positions.
-
title : string | undefined
module:ui/dialog/dialog~DialogDefinition#title
A 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
icon
andhasCloseButton
.
Every day, we work hard to keep our documentation complete. Have you spotted outdated information? Is something missing? Please report it via our issue tracker.
With the release of version 42.0.0, we have rewritten much of our documentation to reflect the new import paths and features. We appreciate your feedback to help us ensure its accuracy and completeness.