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

EditorBuilder

Defines the fluent API for configuring the Kendo UI Editor

Properties

WriteAction - Func

Methods

Value(System.Action)

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

Parameters

value - System.Action

The action which renders the HTML content.

Example


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

Value(System.Func)

Parameters

value - System.Func<Object,Object>

StyleSheets(System.Action)

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

Parameters

configurator - System.Action<EditorStyleSheetBuilder>

Example


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

ExportAs(System.Action)

Configure the exportAs settings.

Parameters

configurator - System.Action<EditorExportAsSettingsBuilder>

An action that configures the ExportAs settings.

Example


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

Import(System.Action)

Configure the import settings.

Parameters

configurator - System.Action<EditorImportSettingsBuilder>

An action that configures the Import settings.

Example


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

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.

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.

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()

In this article
Not finding the help you need?