New to Telerik UI for ASP.NET Core? Download free 30-day trial

EditorBuilder

Properties

WriteAction - Func

Methods

Value(System.Action)

Sets the HTML content that will show initially in the Editor.

Parameters

value - System.Action

The action that renders the HTML content.

Example


            @(Html.Kendo().Editor()
                       .Name("Editor")
                       .Value(@<text>
                           <blockquote>
                               According to Deep Thought, the answer to the ultimate question of
                               life, the universe and everything is <strong>42</strong>.
                           </blockquote>
                       </text>)
            )

Value(System.Func)

Sets the HTML content that will show initially in the Editor.

Parameters

value - System.Func<Object,Object>

The predicate that renders the HTML content.

Example


            @(Html.Kendo().Editor()
                       .Name("Editor")
                       .Value(@<text>
                           <blockquote>
                               According to Deep Thought, the answer to the ultimate question of
                               life, the universe and everything is <strong>42</strong>.
                           </blockquote>
                       </text>)
            )

StyleSheets(System.Action)

Sets the CSS files that will be registered in the Editor's iframe

Parameters

configurator - System.Action<EditorStyleSheetBuilder>

The action that configures the StyleSheets settings.

Example


            @(Html.Kendo().Editor()
                        .Name("Editor")
                        .StyleSheets(styleSheets => styleSheets.Add("editorStyles.css"))
            )

ExportAs(System.Action)

Configures the export settings.

Parameters

configurator - System.Action<EditorExportAsSettingsBuilder>

The action that configures the ExportAs settings.

Example


             @( Html.Kendo().Editor()
                        .Name("Editor")
                        .ExportAs(exportAs => exportAs
                            .FileName("Editor")
                            .Proxy("Export", "Editor")
                        )
            )

Import(System.Action)

Configures the import settings.

Parameters

configurator - System.Action<EditorImportSettingsBuilder>

The action that configures the Import settings.

Example


             @( Html.Kendo().Editor()
                        .Name("Editor")
                        .Import(import => import
                            .Proxy("Import", "Editor")
                        )
            )

FormattingMarksRefreshDelay(System.Boolean)

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.

Parameters

value - System.Boolean

The value for FormattingMarksRefreshDelay

Deserialization(System.Action)

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.

Parameters

configurator - System.Action<EditorDeserializationSettingsBuilder>

The configurator for the deserialization setting.

Domain(System.String)

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.

Parameters

value - System.String

The value for Domain

Encoded(System.Boolean)

Indicates whether the Editor should submit encoded HTML tags. By default, the submitted value is encoded.

Parameters

value - System.Boolean

The value for Encoded

Immutables(System.Action)

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

Parameters

configurator - System.Action<EditorImmutablesSettingsBuilder>

The configurator for the immutables setting.

Immutables()

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

Immutables(System.Boolean)

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

Parameters

enabled - System.Boolean

Enables or disables the immutables option.

Messages(System.Action)

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

Parameters

configurator - System.Action<EditorMessagesSettingsBuilder>

The configurator for the messages setting.

Nonce(System.String)

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.

Parameters

value - System.String

The value for Nonce

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

Parameters

value - System.Boolean

The value for NavigateOnTab

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

NonSplittableTagsOnPaste(System.Action)

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.

Parameters

configurator - System.Action<EditorNonSplittableTagsOnPasteFactory>

The configurator for the nonsplittabletagsonpaste setting.

PasteCleanup(System.Action)

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

Parameters

configurator - System.Action<EditorPasteCleanupSettingsBuilder>

The configurator for the pastecleanup setting.

Pdf(System.Action)

Configures the Kendo UI Editor PDF export settings.

Parameters

configurator - System.Action<EditorPdfSettingsBuilder>

The configurator for the pdf setting.

Placeholder(System.String)

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

Parameters

value - System.String

The value for Placeholder

Resizable(System.Action)

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

Parameters

configurator - System.Action<EditorResizableSettingsBuilder>

The configurator for the resizable setting.

Resizable()

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

Resizable(System.Boolean)

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

Parameters

enabled - System.Boolean

Enables or disables the resizable option.

Serialization(System.Action)

Allows setting of serialization options.

Parameters

configurator - System.Action<EditorSerializationSettingsBuilder>

The configurator for the serialization setting.

Tools(System.Action)

A collection of tools that are used to interact with the Editor. Tools may be switched on by specifying their name. Custom tools and tools that require configuration are defined as objects.The available editor commands are: Basic text formatting - bold, italic, underline, strikethrough, subscript, superscript; Font and color - fontName, fontSize, foreColor, backColor; Alignment - justifyLeft, justifyCenter, justifyRight, justifyFull; Lists - insertUnorderedList, insertOrderedList, indent, outdent; Links, images and files - createLink, unlink, insertImage, insertFile; Table editing - tableWizard, createTable, addColumnLeft, addColumnRight, addRowAbove, addRowBelow, deleteRow, deleteColumn; Structural markup and styles - formatting, cleanFormatting; Snippets - insertHtml; HTML code view - viewHtml; Print edited page - print; Export to PDF - pdf or Format painter - copyFormat, applyFormat.

Parameters

configurator - System.Action<EditorToolFactory>

The configurator for the tools setting.

ImageBrowser(System.Action)

Configuration for image browser dialog.

Parameters

configurator - System.Action<EditorImageBrowserSettingsBuilder>

The configurator for the imagebrowser setting.

FileBrowser(System.Action)

Configuration for file browser dialog.

Parameters

configurator - System.Action<EditorFileBrowserSettingsBuilder>

The configurator for the filebrowser setting.

FormattingMarksRefreshDelay(System.Double)

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.

Parameters

value - System.Double

The value for FormattingMarksRefreshDelay

UnsafeInline(System.Boolean)

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

Parameters

value - System.Boolean

The value for UnsafeInline

Tag(System.String)

The tag that will be rendered. Defaults to "textarea". Triggers the inline edit mode if different.

Parameters

value - System.String

The value for Tag

Value(System.String)

The content of the editor.

Parameters

value - System.String

The value for Value

Events(System.Action)

Configures the client-side events.

Parameters

configurator - System.Action<EditorEventBuilder>

The client events action.

Example


            @(Html.Kendo().Editor()
                  .Name("Editor")
                  .Events(events => events
                      .Change("onChange")
                  )
            )

ToComponent()

Returns the internal view component.

Expression(System.String)

Sets the name of the component.

Parameters

modelExpression - System.String

Explorer(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer)

Sets the name of the component.

Parameters

modelExplorer - Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer

Name(System.String)

Sets the name of the component.

Parameters

componentName - System.String

The name.

Deferred(System.Boolean)

Suppress initialization script rendering. Note that this options should be used in conjunction with

Parameters

deferred - System.Boolean

HtmlAttributes(System.Object)

Sets the HTML attributes.

Parameters

attributes - System.Object

The HTML attributes.

HtmlAttributes(System.Collections.Generic.IDictionary)

Sets the HTML attributes.

Parameters

attributes - System.Collections.Generic.IDictionary<String,Object>

The HTML attributes.

Render()

Renders the component in place.

ToHtmlString()

WriteTo(System.IO.TextWriter,System.Text.Encodings.Web.HtmlEncoder)

Parameters

writer - System.IO.TextWriter
encoder - System.Text.Encodings.Web.HtmlEncoder

ToClientTemplate()

AsChildComponent()

Configures the widget as a child component.

In this article
Not finding the help you need?