Skip to main content

ASPxClientHtmlEditor.BeforePaste Event

Occurs before an HTML code is pasted to editor content, and allows you to modify it.

Declaration

BeforePaste: ASPxClientEvent<ASPxClientHtmlEditorBeforePasteEventHandler<ASPxClientHtmlEditor>>

Event Data

The BeforePaste event's data class is ASPxClientHtmlEditorBeforePasteEventArgs. The following properties provide information specific to this event:

Property Description
commandName Gets the name of the processed command.
html Gets or sets the HTML markup that is about to be pasted to the ASPxHtmlEditor’s content.

Remarks

Use the BeforePaste event to modify an HTML code before it is pasted to the editor. The event occurs in the following cases.

The event parameter’s ASPxClientHtmlEditorBeforePasteEventArgs.commandName property identifies the command currently being processed. To access the pasted HTML code, use the ASPxClientHtmlEditorBeforePasteEventArgs.html property.

To learn more about paste formatting, see the Paste Formatting topic.

See Also