Skip to main content

ASPxHtmlEditor.HtmlCorrecting Event

Occurs before the ASPxHtmlEditor‘s HTML markup is automatically corrected based upon the HTML validation parameters specified.

Namespace: DevExpress.Web.ASPxHtmlEditor

Assembly: DevExpress.Web.ASPxHtmlEditor.v24.2.dll

Declaration

public event EventHandler<HtmlCorrectingEventArgs> HtmlCorrecting

Event Data

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

Property Description
Handled Gets or sets whether an HTML markup correcting operation is handled manually, so no default processing is required.
Html Gets or sets the HTML markup representing the HtmlCorrectingEventArgs‘s content.

Remarks

The HtmlCorrecting event allows you to perform any custom check or transformation of the editor’s HTML code before it is validated automatically based upon the specified HTML validation parameters. Automatic HTML validation is performed via an internal call to the ASPxHtmlEditor.CorrectHtml method.

You can avoid automatic HTML code validation by setting the HtmlCorrectingEventArgs.Handled property to true in an event handler.

Note

A browser automatically validates any HTML markup that is assigned to the innerHTML property. To learn more, see the ASPxHtmlEditor HTML correction online Knowledge Base article.

Important

The ASPxHtmlEditor.Html property value is empty in the HtmlCorrecting event handler. Because the ASPxHtmlEditor.Html property is set to the HtmlCorrectingEventArgs.Html event argument value after the HtmlCorrecting event has processed the HTML code (on a page load).

<dx:ASPxHtmlEditor ID="ASPxHtmlEditor1" OnHtmlCorrecting="ASPxHtmlEditor1_HtmlCorrecting" runat="server">
...
</dx:ASPxHtmlEditor>

View Example: How to process images inserted in Base64 format

See Also