New to Telerik UI for ASP.NET MVC? Start a free 30-day trial

Editor

Class

Definition

Constructors

C#
public Editor(ViewContext viewContext, IJavaScriptInitializer initializer, IUrlGenerator urlGenerator)
Parameters:viewContextViewContextinitializerIJavaScriptInitializerurlGeneratorIUrlGenerator

Properties

Defines the configuration options for the AI tools in the Editor.

C#
public EditorAISettings AI { get; set; }
C#
public Action Content { get; set; }
C#
public EditorToolGroup DefaultToolGroup { get; }

Fine-tune deserialization in the Editor widget. Deserialization is the process of parsing the HTML string input from the value() method or from the viewHtml dialog into editable content.

C#
public EditorDeserializationSettings Deserialization { get; set; }

Relaxes the same-origin policy when using the iframe-based editor. This is done automatically for all cases except when the policy is relaxed by document.domain = document.domain. In that case, this property must be used to allow the editor to function properly across browsers. This property has been introduced in internal builds after 2014.1.319.

C#
public string Domain { get; set; }
C#
public bool? Encode { get; set; }
C#
public EditorExportAsSettings ExportAsSettings { get; }
C#
public EditorFileBrowserSettings FileBrowserSettings { get; }

The delay in milliseconds before the formatting marks are refreshed. This feature is useful for performance optimization as the formatting marks are re-rendered any time the user presses a key. If the user is typing very fast or holding down a key, the delay will prevent the re-rendering from being executed multiple times.The visual effect from this configuration is that the marks will briefly disappear while the user is typing. You can set the value to false to fully turn off this behavior.

C#
public double? FormattingMarksRefreshDelay { get; set; }

The delay in milliseconds before the formatting marks are refreshed. This feature is useful for performance optimization as the formatting marks are re-rendered any time the user presses a key. If the user is typing very fast or holding down a key, the delay will prevent the re-rendering from being executed multiple times.The visual effect from this configuration is that the marks will briefly disappear while the user is typing. You can set the value to false to fully turn off this behavior.

C#
public bool? FormattingMarksRefreshDelayEnabled { get; set; }
C#
public EditorImageBrowserSettings ImageBrowserSettings { get; }

If enabled, the editor disables the editing and command execution in elements marked with editablecontent="false" attribute.

C#
public EditorImmutablesSettings Immutables { get; set; }
C#
public EditorImportSettings ImportSettings { get; }

This property enables you to configure height for the Editor when the component is in inline mode.

C#
public double? InlineHeight { get; set; }

Defines the text of the labels that are shown within the editor. Used primarily for localization.

C#
public EditorMessagesSettings Messages { get; set; }

If set to true this configuration option would enable Tab-based navigation among Editor ToolBar items. By default navigation is arrow-based.

C#
public bool? NavigateOnTab { get; set; }

When strict CSP is enabled a nonce can be provided for the inline styles. The passed value would be used as the nonce attribute for the inline styles in the content area iframe, the placeholder inline style and the link tags loading external stylesheets in the content area.

C#
public string Nonce { get; set; }

When pasting a block element inside an element such as a list ul, the list gets split in half and the block element is inserted between the two ul elements.This configuration enables you to specify elements for which the above behavior will be ignored.

C#
public List<EditorNonSplittableTagsOnPaste> NonSplittableTagsOnPaste { get; set; }

Options for controlling how the pasting content is modified before it is added in the editor.

C#
public EditorPasteCleanupSettings PasteCleanup { get; set; }
C#
public PDFSettings Pdf { get; }

The hint displayed by the widget when it is empty. Not set by default.

C#
public string Placeholder { get; set; }

If enabled, the editor renders a resize handle to allow users to resize it.

C#
public EditorResizableSettings Resizable { get; set; }

Allows setting of serialization options.

C#
public EditorSerializationSettings Serialization { get; set; }
C#
public IList<string> StyleSheets { get; }
C#
public string TagName { get; set; }
C#
public HtmlTemplate Template { get; }

When set to false, the decoration applied by the Formatting tool dropdown will be skipped and the values will appear as plain text options.

C#
public bool? UnsafeInline { get; set; }
C#
public string Value { get; set; }

Methods

C#
public override IDictionary<string, object> Serialize()
Returns:

IDictionary<string, object>

Overrides: WidgetBase.Serialize()

Implements: IFormEditor.Serialize()

Writes the HTML.

C#
protected override void WriteHtml(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

Overrides: WidgetBase.WriteHtml(HtmlTextWriter)

Writes the initialization script.

C#
public override void WriteInitializationScript(TextWriter writer)
Parameters:writerTextWriter

The writer.

Overrides: WidgetBase.WriteInitializationScript(TextWriter)