HtmlEditorExtension Class
Represents an extension object implementing the HtmlEditor functionality.
Namespace: DevExpress.Web.Mvc
Assembly: DevExpress.Web.Mvc5.v24.1.dll
NuGet Package: DevExpress.Web.Mvc5
Declaration
Related API Members
The following members return HtmlEditorExtension objects:
Remarks
To declare the HtmlEditor in a View, invoke the ExtensionsFactory.HtmlEditor helper method. This method returns the HtmlEditor extension that is implemented by the HtmlEditorExtension class.
To configure the HtmlEditor extension, pass the HtmlEditorSettings object to the ExtensionsFactory.HtmlEditor helper method as a parameter. The HtmlEditorSettings object contains all the HtmlEditor extension settings.
Concepts
Example
@Html.DevExpress().HtmlEditorFor(m => m.Html, settings => {
settings.CallbackRouteValues = new { Controller = "Features", Action = "FeaturesPartial" };
settings.Height = Unit.Pixel(370);
settings.SettingsHtmlEditing.AllowScripts = Model.AllowScripts;
settings.SettingsHtmlEditing.AllowIFrames = Model.AllowIFrames;
settings.SettingsHtmlEditing.AllowFormElements = Model.AllowFormElements;
settings.SettingsHtmlEditing.UpdateDeprecatedElements = Model.UpdateDeprecatedElements;
settings.SettingsHtmlEditing.UpdateBoldItalic = Model.UpdateBoldItalic;
settings.SettingsHtmlEditing.EnterMode = Model.EnterMode;
settings.SettingsHtmlEditing.AllowIdAttributes = Model.AllowIdAttributes;
settings.SettingsHtmlEditing.AllowStyleAttributes = Model.AllowStyleAttributes;
settings.SettingsHtmlEditing.AllowedDocumentType = Model.AllowedDocumentType;
settings.SettingsHtmlEditing.AllowEditFullDocument = Model.AllowEditFullDocument;
settings.SettingsHtmlEditing.ResourcePathMode = Model.ResourcePathMode;
settings.Settings.AllowCustomColorsInColorPickers = Model.AllowCustomColorsInColorPickers;
Model.PrepareHtmlEditorSettings(settings);
}).GetHtml()
Online Demos
Inheritance
Object
ExtensionBase
HtmlEditorExtension
See Also