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.

RETURNS

Returns the current instance of EditorBuilder to allow method chaining.

Example

Razor
 
            @(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.

RETURNS

Returns the current instance of EditorBuilder to allow method chaining.

Example

Razor
 
            @(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.

RETURNS

Returns the current instance of EditorBuilder to allow method chaining.

Example

Razor
 
            @(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.

RETURNS

Returns the current instance of EditorBuilder to allow method chaining.

Example

Razor
 
             @( 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.

RETURNS

Returns the current instance of EditorBuilder to allow method chaining.

Example

Razor
 
             @( 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

RETURNS

Returns the current instance of EditorBuilder to allow method chaining.

AI(System.Action)

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

Parameters

configurator - System.Action<EditorAISettingsBuilder>

The configurator for the ai setting.

RETURNS

Returns the current instance of EditorBuilder to allow method chaining.

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.

RETURNS

Returns the current instance of EditorBuilder .

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

RETURNS

Returns the current EditorBuilder instance.

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

RETURNS

Returns the current EditorBuilder instance.

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.

RETURNS

Returns the current instance of EditorBuilder .

Immutables()

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

RETURNS

Returns the current instance of EditorBuilder .

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.

RETURNS

Returns the current instance of EditorImmutablesSettingsBuilder .

InlineHeight(System.Double)

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

Parameters

value - System.Double

The value for InlineHeight

RETURNS

Returns the current EditorBuilder instance.

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.

RETURNS

Returns the current instance of EditorBuilder .

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

RETURNS

Returns the current EditorBuilder instance.

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

RETURNS

Returns the current EditorBuilder instance.

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

RETURNS

Returns the current EditorBuilder instance.

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.

RETURNS

Returns the current instance of EditorBuilder .

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.

RETURNS

Returns the current instance of EditorBuilder .

Pdf(System.Action)

Configures the Kendo UI Editor PDF export settings.

Parameters

configurator - System.Action<EditorPdfSettingsBuilder>

The configurator for the pdf setting.

RETURNS

Returns the current instance of EditorBuilder .

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

RETURNS

Returns the current EditorBuilder instance.

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.

RETURNS

Returns the current instance of EditorBuilder .

Resizable()

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

RETURNS

Returns the current instance of EditorBuilder .

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.

RETURNS

Returns the current instance of EditorResizableSettingsBuilder .

Serialization(System.Action)

Allows setting of serialization options.

Parameters

configurator - System.Action<EditorSerializationSettingsBuilder>

The configurator for the serialization setting.

RETURNS

Returns the current instance of EditorBuilder .

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; Spacing - lineHeight; 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; Format painter - copyFormat, applyFormat or Formatting marks - formattingMarks.

Parameters

configurator - System.Action<EditorToolFactory>

The configurator for the tools setting.

RETURNS

Returns the current instance of EditorBuilder .

ImageBrowser(System.Action)

Configuration for image browser dialog.

Parameters

configurator - System.Action<EditorImageBrowserSettingsBuilder>

The configurator for the imagebrowser setting.

RETURNS

Returns the current instance of EditorBuilder .

FileBrowser(System.Action)

Configuration for file browser dialog.

Parameters

configurator - System.Action<EditorFileBrowserSettingsBuilder>

The configurator for the filebrowser setting.

RETURNS

Returns the current instance of EditorBuilder .

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

RETURNS

Returns the current EditorBuilder instance.

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

RETURNS

Returns the current EditorBuilder instance.

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

RETURNS

Returns the current EditorBuilder instance.

Value(System.String)

The content of the editor.

Parameters

value - System.String

The value for Value

RETURNS

Returns the current EditorBuilder instance.

Events(System.Action)

Configures the client-side events.

Parameters

configurator - System.Action<EditorEventBuilder>

The client events action.

RETURNS

Returns the current EditorBuilder instance.

Example

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

ToComponent()

Returns the internal view component.

RETURNS

The instance that represents the component.

Expression(System.String)

Sets the name of the component.

Parameters

modelExpression - System.String

RETURNS

Returns the current instance.

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

Sets the name of the component.

Parameters

modelExplorer - Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer

RETURNS

Returns the current instance.

Name(System.String)

Sets the name of the component.

Parameters

componentName - System.String

The name.

RETURNS

Returns the current instance.

Deferred(System.Boolean)

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

Parameters

deferred - System.Boolean

RETURNS

Returns a DeferredWidgetBuilder instance.

HtmlAttributes(System.Object)

Sets the HTML attributes.

Parameters

attributes - System.Object

The HTML attributes.

RETURNS

Returns the current instance.

HtmlAttributes(System.Collections.Generic.IDictionary)

Sets the HTML attributes.

Parameters

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

The HTML attributes.

RETURNS

Returns the current instance.

ScriptAttributes(System.Object,System.Boolean)

Sets the JavaScript attributes to the initialization script.

Parameters

attributes - System.Object

The JavaScript attributes.

overrideAttributes - System.Boolean

Argument which determines whether attributes should be overriden.

RETURNS

Returns the current instance.

ScriptAttributes(System.Collections.Generic.IDictionary,System.Boolean)

Sets the JavaScript attributes to the initialization script.

Parameters

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

The JavaScript attributes.

overrideAttributes - System.Boolean

Argument which determines whether attributes should be overriden.

RETURNS

Returns the current instance.

Render()

Renders the component in place.

ToHtmlString()

Returns the HTML representation of the component.

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

Parameters

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

ToClientTemplate()

Returns the client template for the component.

AsModule(System.Boolean)

Specifies whether the initialization script of the component will be rendered as a JavaScript module.

Parameters

value - System.Boolean

RETURNS

Returns the current instance.