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

Defines the fluent API for configuring EditorToolBuilder settings

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class EditorToolBuilder

Inheritance: objectEditorToolBuilder

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

EditorToolBuilder method.

C#
public EditorToolBuilder(EditorTool container)
Parameters:containerEditorTool

Properties

Gets the settings being configured.

C#
protected EditorTool Container { get; }

Methods

Specifies the colors columns for "foreColor" and "backColor" tools when list of colors are defined.

C#
public EditorToolBuilder Columns(double value)
Parameters:valuedouble

The value for Columns

Returns:

EditorToolBuilder

Returns the current EditorToolBuilder instance.

The JavaScript function which will be executed when the end-user clicks the tool button.

C#
public EditorToolBuilder Exec(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

EditorToolBuilder

Returns the current EditorToolBuilder instance.

The JavaScript function which will be executed when the end-user clicks the tool button.

C#
public EditorToolBuilder Exec(string handler)
Parameters:handlerstring

The name of the JavaScript function that will be evaluated.

Returns:

EditorToolBuilder

Returns the current EditorToolBuilder instance.

Specifies the icon that will be rendered for the tools.

C#
public EditorToolBuilder Icon(string value)
Parameters:valuestring

The value for Icon

Returns:

EditorToolBuilder

Returns the current EditorToolBuilder instance.

For tools that display a list of items (fontName, fontSize, formatting), this option specifies the items in the shown list.

C#
public EditorToolBuilder Items(Action<EditorToolItemFactory> configurator)
Parameters:configuratorAction<EditorToolItemFactory>

The EditorToolItemFactory for the items setting.

Returns:

EditorToolBuilder

Returns the current instance of EditorToolBuilder .

When specifying a tool as an object, a tool name is required. Please note that "undo" and "redo" are reserved tool names.

C#
public EditorToolBuilder Name(string value)
Parameters:valuestring

The value for Name

Returns:

EditorToolBuilder

Returns the current EditorToolBuilder instance.

Specifies the color palette for "ForeColor" and "BackColor" tools.

C#
public EditorToolBuilder Palette(ColorPickerPalette palette)
Parameters:paletteColorPickerPalette

The ColorPickerPalette palette.

Returns:

EditorToolBuilder

A reference to this EditorToolBuilder instance after the call.

Example:
C#
@(Html.Kendo().Editor()
.Name("Editor")
.Tools(tools =&gt; tools
.ForeColor(config =&gt; config.Palette(ColorPickerPalette.WebSafe))
.BackColor(config =&gt; config.Palette(ColorPickerPalette.Basic))
)
)

Specifies a list of colors for "ForeColor" and "BackColor" tools.

C#
public EditorToolBuilder Palette(IEnumerable<string> colors)
Parameters:colorsIEnumerable<string>

The collection of colors.

Returns:

EditorToolBuilder

A reference to this EditorToolBuilder instance after the call.

Example:
C#
@(Html.Kendo().Editor()
.Name("Editor")
.Tools(tools =&gt; tools
.ForeColor(config =&gt; config.Palette(new string[] { "#ffffff", "#ffff00", "#db9791" }))
.BackColor(config =&gt; config.Palette(new string[] { "#ffffff", "#ffff00", "#db9791" }))
)
)

The kendo template that will be used for rendering the given tool.

C#
public EditorToolBuilder Template(string value)
Parameters:valuestring

The value for Template

Returns:

EditorToolBuilder

Returns the current EditorToolBuilder instance.

The kendo template that will be used for rendering the given tool.

C#
public EditorToolBuilder Template<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the template.

Returns:

EditorToolBuilder

Returns the current EditorToolBuilder instance.

The kendo template that will be used for rendering the given tool.

C#
public EditorToolBuilder TemplateHandler(string templateHandler)
Parameters:templateHandlerstring

The handler that returs the template for Template

Returns:

EditorToolBuilder

Returns the current EditorToolBuilder instance.

The kendo template that will be used for rendering the given tool.

C#
public EditorToolBuilder TemplateId(string templateId)
Parameters:templateIdstring

The ID of the template element for Template

Returns:

EditorToolBuilder

Returns the current EditorToolBuilder instance.

The kendo template that will be used for rendering the given tool.

C#
public EditorToolBuilder TemplateView(IHtmlContent templateView)
Parameters:templateViewIHtmlContent

The view that contains the template for Template

Returns:

EditorToolBuilder

Returns the current EditorToolBuilder instance.

The text which will be displayed when the end-user hovers the tool button with the mouse.

C#
public EditorToolBuilder Tooltip(string value)
Parameters:valuestring

The value for Tooltip

Returns:

EditorToolBuilder

Returns the current EditorToolBuilder instance.