HtmlCorrectingEventArgs.Html Property
In This Article
Gets or sets the HTML markup representing the HtmlCorrectingEventArgs‘s content.
Namespace: DevExpress.Web.ASPxHtmlEditor
Assembly: DevExpress.Web.ASPxHtmlEditor.v24.2.dll
NuGet Package: DevExpress.Web
#Declaration
#Property Value
Type | Description |
---|---|
String | A string value representing the editor’s HTML markup. |
#Remarks
Use the Html property to obtain or define the HTML code that represents the HtmlCorrectingEventArgs‘s content.
If you provide a custom HTML markup correcting operation, you should process the markup obtained via the Html property, assign the resulting markup back to this property, and set the HtmlCorrectingEventArgs.Handled property to true
, to avoid the default markup correction implemented via the ASPxHtmlEditor.CorrectHtml method.
protected void ASPxHtmlEditor1_HtmlCorrecting(object sender, DevExpress.Web.ASPxHtmlEditor.HtmlCorrectingEventArgs e)
{
if (!string.IsNullOrEmpty(e.Html) && e.Html.Contains("http://localhost")) {
string[] str = e.Html.Split('"');
int index = Array.FindIndex(str, s => s.StartsWith("http://localhost"));
string[] str2 = str[index].Split('V');
string replaceString = str2[0];
e.Html = e.Html.Replace(replaceString, "../../");
}
}
See Also