Sign up (with export icon)

DialogDefinition

Api-interface icon interface

The definition that describes a dialog window and its content. Passed to the show method.

Properties

  • Chevron-right icon

    The action buttons displayed in the dialog's footer.

  • Chevron-right icon

    className : string | undefined

    An additional CSS class set on the outermost (.ck.ck-dialog) container element allowing for visual customization.

  • Chevron-right icon

    content : View<HTMLElement> | Array<View<HTMLElement>> | undefined

    The content of the dialog. It can be a single View or an array of views.

  • Chevron-right icon

    hasCloseButton : boolean | undefined

    A flag indicating whether the dialog should have a close button in the header. true by default. Works when title 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.

  • Chevron-right icon

    icon : string | undefined

    The SVG string of an icon displayed in dialogs's header. Used only when title is also set and the header is displayed.

    See more in content.

  • Chevron-right icon

    id : string

    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 the DialogShowEvent and DialogHideEvent events.

  • Chevron-right icon

    isModal : boolean | undefined

    When set to true, the dialog will become a modal, that is, it will block the UI until it is closed.

  • Chevron-right icon

    Options that will be passed to the keystroke handler of the dialog view.

    See KeystrokeHandlerOptions to learn more about the available options.

  • Chevron-right icon

    onHide : ( dialog: Dialog ) => void | undefined

    A callback called when the dialog hides with a low priority. It allows for cleaning up (for example, resetting) the dialog's content.

  • Chevron-right icon

    onShow : ( dialog: Dialog ) => void | undefined

    A callback called when the dialog shows up with a low priority. It allows for setting up the dialog's content.

  • Chevron-right icon

    position : null | 'screen-center' | 'editor-center' | 'editor-top-side' | 'editor-top-center' | 'editor-bottom-center' | 'editor-above-center' | 'editor-below-center' | ( dialogRect: Rect, domRootRect: null | Rect ) => ( null | object ) | undefined

    Available dialog positions. By default DialogViewPosition.EDITOR_CENTER is used for non-modals and DialogViewPosition.SCREEN_CENTER for 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.

  • Chevron-right icon

    title : string | undefined

    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 and hasCloseButton.