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

Kendo UI EditorTool TagHelper EditorToolTagHelper class.

Definition

Namespace:Kendo.Mvc.TagHelpers

Assembly:Kendo.Mvc.dll

Syntax:

C#
[HtmlTargetElement("tool", ParentTag = "tools", TagStructure = TagStructure.NormalOrSelfClosing)]
[RestrictChildren("tool-items", new string[] { "tool-template" })]
[SuppressTagRendering]
public class EditorToolTagHelper : TagHelperCollectionItemBase, ITagHelper, ITagHelperComponent, ITemplateComponent

Inheritance: objectTagHelperTagHelperChildBaseTagHelperCollectionItemBaseEditorToolTagHelper

Implements: ITagHelperITagHelperComponentITemplateComponent

Inherited Members TagHelperChildBase.Init(TagHelperContext)TagHelperChildBase.AddSelfToContext(TagHelperContext)TagHelperChildBase.CreateHandler(string)TagHelperChildBase.IdPrefixTagHelper.Process(TagHelperContext, TagHelperOutput)TagHelper.Orderobject.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Example:

csharp
@addTagHelper *, Kendo.Mvc

<kendo-editor name="editor">
    <tools>
        <tool name="foreColor" columns="5"></tool>
    </tools>
</kendo-editor>

Constructors

Initializes a new instance of the EditorToolTagHelper class.

C#
public EditorToolTagHelper()

Properties

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

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

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

C#
public string Exec { get; set; }

Specifies the icon that will be rendered for the tools.

C#
public string Icon { get; set; }

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

C#
public string Name { get; set; }

Specifies the color palette for "foreColor" and "backColor" tools. If you need to use the color gradient view in the picker instead of the palette, set this value to null.

C#
public string Palette { get; set; }

Specifies custom color palette for "foreColor" and "backColor" tools. For using the default options: "basic" or "websafe" palette attribute.

C#
public string[] PaletteOptions { get; set; }

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

C#
public string Template { get; set; }

The kendo template that will be used for rendering the given tool. This option expects the name of a JavaScript function that will be called to return the template.

C#
public string TemplateHandler { get; set; }

The kendo template that will be used for rendering the given tool. This option expects the ID of the script element that contains the template.

C#
public string TemplateId { get; set; }

Represents a collection of templates defined for the component.

C#
[HtmlAttributeNotBound]
public IDictionary<string, string> Templates { get; }

Implements: ITemplateComponent.Templates

The kendo template that will be used for rendering the given tool. This option expects the IHtmlContent instance containing the created HTML.

C#
public IHtmlContent TemplateView { get; set; }

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

C#
public string Tooltip { get; set; }

Methods

Adds the current TagHelper instance to its parent TagHelper.

C#
protected override void AddSelfToParent(TagHelperContext context)
Parameters:contextTagHelperContext

The TagHelper context.

Overrides: TagHelperChildBase.AddSelfToParent(TagHelperContext)

C#
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Parameters:contextTagHelperContextoutputTagHelperOutputReturns:

Task

Overrides: TagHelperChildBase.ProcessAsync(TagHelperContext, TagHelperOutput)

Serializes the defined settings.

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

Dictionary<string, object>