Custom Dialogs

  • 2 min to read

In addition to built-in dialogs available in ASPxHtmlEditor, you can use any number of custom dialogs, which can be easily added at both design and runtime.

ASPxHtmlEditor-CustomDialog-Invoke

To add custom dialogs to an editor, use its ASPxHtmlEditor.CustomDialogs collection. A custom dialog is represented by an HtmlEditorCustomDialog object, which provides the following settings.

You can associate a custom dialog with a toolbar item, which when clicked, invokes the dialog. To accomplish this, add a ToolbarCustomDialogButton toolbar item to ASPxHtmlEditor and assign the dialog's name to the toolbar item's ToolbarCustomDialogButton.Name property.

Custom Dialog Events

ASPxHtmlEditor provides you with the following events that allow you to respond to end-user interactions with custom dialogs and dialog button clicks on the client side.

Event Description
ASPxClientHtmlEditor.CustomDialogOpened Handle this event to initialize a custom dialog.
ASPxClientHtmlEditor.CustomDialogClosing Handle this event to respond to closing a custom dialog (initiated by a click on a dialog button or the header's close button).
ASPxClientHtmlEditor.CustomDialogClosed Handle this event to perform specific actions, based upon the dialog button that has been clicked or any other suitable condition.