Back to Devexpress

HTML Validation Parameters

aspnet-7508-components-html-editor-concepts-content-filtering-and-validation-html-validation-html-validation-parameters.md

latest4.1 KB
Original Source

HTML Validation Parameters

  • Jan 17, 2022
  • 2 minutes to read

Real-time validation of the HTML markup entered into the HTML View is performed automatically by using an internal call to the ASPxHtmlEditor.CorrectHtml method. Validation parameters for this method are specified by settings that can be accessed with the ASPxHtmlEditor.SettingsHtmlEditing property:

Settings (property)Description
HtmlEditorHtmlEditingSettings.AllowedDocumentTypeSpecifies what document types are allowed within ASPxHtmlEditor.
HtmlEditorHtmlEditingSettings.AllowFormElementsSpecifies whether the editor’s HTML markup can contain form elements such as ‘form’, ‘input’, and ‘select’.
HtmlEditorHtmlEditingSettings.AllowHTML5MediaElementsSpecifies whether the editor’s HTML markup can contain HTML5 media elements (‘audio’ and ‘video’ elements).
HtmlEditorHtmlEditingSettings.AllowIdAttributesSpecifies whether the editor’s HTML markup can contain ID attributes.
HtmlEditorHtmlEditingSettings.AllowIFramesSpecifies whether the editor’s HTML markup can contain iFrames.
HtmlEditorHtmlEditingSettings.AllowObjectAndEmbedElementsSpecifies whether the editor’s HTML markup can contain ‘object’ and ‘embed’ elements.
HtmlEditorHtmlEditingSettings.AllowScriptsSpecifies whether the editor’s HTML markup can contain scripts.
ASPxHtmlEditorSettings.AllowScriptExecutionInPreviewSpecifies whether the editor’s content scripts should be executed in Preview.
HtmlEditorHtmlEditingSettings.AllowStyleAttributesSpecifies whether the editor’s HTML markup can contain style attributes.
HtmlEditorHtmlEditingSettings.AllowYouTubeVideoIFramesSpecifies whether the editor’s HTML markup can contain the ‘iframe’ element containing a link to YouTube video.
HtmlEditorHtmlEditingSettings.UpdateBoldItalicSpecifies whether the <b> (bold) and <i> (italic) elements within the editor’s HTML markup should be replaced with the <strong> and <em> elements, respectively.
HtmlEditorHtmlEditingSettings.UpdateDeprecatedElementsSpecifies whether deprecated elements found within the editor’s HTML markup should be replaced with their valid variants.

You can also update HTML code manually by handling the ASPxHtmlEditor.HtmlCorrecting event.

See Also

HTML Validation

HtmlCorrecting

CorrectHtml

SettingsHtmlEditing