HTML Validation Parameters
- 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.AllowedDocumentType | Specifies what document types are allowed within ASPxHtmlEditor. |
HtmlEditorHtmlEditingSettings.AllowFormElements | Specifies whether or not the editor’s HTML markup can contain form elements such as ‘form’, ‘input’ and ‘select’. |
HtmlEditorHtmlEditingSettings.AllowHTML5MediaElements | Specifies whether or not the editor’s HTML markup can contain HTML5 media elements, i.e., ‘audio’ and ‘video’ elements. |
HtmlEditorHtmlEditingSettings.AllowIdAttributes | Specifies whether the editor’s HTML markup can contain ID attributes. |
HtmlEditorHtmlEditingSettings.AllowIFrames | Specifies whether the editor’s HTML markup can contain iFrames. |
HtmlEditorHtmlEditingSettings.AllowObjectAndEmbedElements | Specifies whether the editor’s HTML markup can contain ‘object’ and ‘embed’ elements. |
HtmlEditorHtmlEditingSettings.AllowScripts | Specifies whether the editor’s HTML markup can contain scripts. |
ASPxHtmlEditorSettings.AllowScriptExecutionInPreview | Specifies whether the editor’s content scripts should be executed in Preview. |
HtmlEditorHtmlEditingSettings.AllowStyleAttributes | Specifies whether the editor’s HTML markup can contain style attributes. |
HtmlEditorHtmlEditingSettings.AllowYouTubeVideoIFrames | Specifies whether the editor’s HTML markup can contain the ‘iframe’ element containing a link to YouTube video. |
HtmlEditorHtmlEditingSettings.UpdateBoldItalic | Specifies whether the <b> (bold) and <i> (italic) elements occurring within the editor’s HTML markup should be replaced with the <strong> and <em> elements respectively. |
HtmlEditorHtmlEditingSettings.UpdateDeprecatedElements | Specifies 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