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

EditorToolFactory

Methods

CustomTemplate(System.Action)

Adds a custom template tool.

Parameters

configurator - System.Action<EditorCustomTemplateToolBuilder>

The action which configures the custom template tool.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools
                    .CustomTemplate(x => x.Template("<button class='k-button'>Save draft</button>"))
               )
             )

CustomButton(System.Action)

Adds a custom button tool.

Parameters

configurator - System.Action<EditorCustomButtonToolBuilder>

The action which configures the custom button tool.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools
                    .CustomButton(x => x
                       .Name("custom")
                       .ToolTip("Insert a horizontal rule")
                       .Exec(@<text>
                           function(e) {
                               var editor = $(this).data("kendoEditor");
                               editor.exec("inserthtml", { value: "<hr />" });
                           }
                       </text>)
                    )
               )
             )

Clear()

Clears all tools. If you remove the Clear() option, the default toolbar will be shown along with the buttons specified by you.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.Clear())
             )

Bold()

Adds Bold tool.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.Bold())
             )

Italic()

Adds Italic tool.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.Italic())
             )

Underline()

Adds Underline tool.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.Underline())
             )

Undo()

Adds Undo tool.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.Undo())
             )

Strikethrough()

Adds Strikethrough tool.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.Strikethrough())
             )

JustifyLeft()

Adds JustifyLeft tool.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.JustifyLeft())
             )

JustifyRight()

Adds JustifyRight tool.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.JustifyRight())
             )

JustifyCenter()

Adds JustifyCenter tool.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.JustifyCenter())
             )

JustifyFull()

Adds JustifyFull tool.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.JustifyFull())
             )

InsertUnorderedList()

Adds InsertUnorderedList tool.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.InsertUnorderedList())
             )

Indent()

Adds Indent tool.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.Indent())
             )

Pdf()

Adds Pdf tool.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.Pdf())
             )

Import()

Adds Import tool.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.Import())
             )

ExportAs()

Adds ExportAs tool.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.ExportAs())
             )

ExportAs(System.Action)

Adds ExportAs tool.

Parameters

configurator - System.Action<EditorDropDownItemBuilder>

The action that configures the ExportAs tool settings.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools
                    .ExportAs(exportAs => exportAs.Add("PDF","pdf"))
                )
             )

Outdent()

Adds Outdent tool.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.Outdent())
             )

InsertOrderedList()

Adds InsertOrderedList tool.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.InsertOrderedList())
             )

InsertUpperRomanList()

Adds InsertUpperRomanList tool.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.InsertUpperRomanList())
             )

InsertLowerRomanList()

Adds InsertUpperRomanList tool.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.InsertLowerRomanList())
             )

InsertImage()

Adds InsertImage tool.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.InsertImage())
             )

InsertFile()

Adds InsertFile tool.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.InsertFile())
             )

Adds CreateLink tool.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.CreateLink())
             )

Adds Unlink tool.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.Unlink())
             )

SubScript()

Adds SubScript tool.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.SubScript())
             )

SuperScript()

Adds SuperScript tool.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.SuperScript())
             )

ViewHtml()

Adds ViewHtml tool.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.ViewHtml())
             )

Print()

Adds Print tool.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.Print())
             )

Redo()

Adds Redo tool.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.Redo())
             )

FontName()

Adds FontName tool.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.FontName())
             )

FontName(System.Action)

Adds FontName tool.

Parameters

configurator - System.Action<EditorDropDownItemBuilder>

The action that configures the FontName tool settings.

Example


             @( Html.Kendo().Editor()
                .Name("Editor")
                .Tools(tools => tools
                    .FontName(items => items
                        .Add("Verdana", "Verdana,Geneva,sans-serif")
                        .Add("Garamond", "Garamond, serif")
                    )
                )
             )

FontSize()

Adds FontSize tool.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.FontSize())
             )

FontSize(System.Action)

Adds FontSize tool.

Parameters

configurator - System.Action<EditorDropDownItemBuilder>

The action that configures the FontSize tool settings.

Example


             @( Html.Kendo().Editor()
                .Name("Editor")
                .Tools(tools => tools
                    .FontSize(items => items
                        .Add("1 (8pt)","1")
                        .Add("2 (10pt)","2")
                    )
                )
             )

Formatting()

Adds Formatting tool.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.Formatting())
             )

Formatting(System.Action)

Adds Formatting tool.

Parameters

configurator - System.Action<EditorDropDownItemBuilder>

The action that configures the Formatting tool settings.

Example


             @( Html.Kendo().Editor()
                .Name("Editor")
                .Tools(tools => tools
                    .Formatting(items => items
                        .Add("Paragraph","1")
                        .Add("Quotation","2")
                    )
                )
             )

Snippets(System.Action)

Adds Snippets tool.

Parameters

configurator - System.Action<EditorSnippetBuilder>

The action that configures the Snippets tool settings.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools
                    .Snippets(snippets => snippets
                        .Add("Signature", "<p>Regards,<br /> John Doe,<br <a
                            href='mailto:john.doe@example.com'>john.doe@example.com</a></p>")
                    )
                )
             )

FontColor()

Adds FontColor tool.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.FontColor())
             )

FontColor(System.Action)

Adds FontColor tool.

Parameters

configurator - System.Action<EditorColorPickerToolBuilder>

The action that configures the FontColor tool settings.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools
                    .FontColor(items => items
                        .Palette(new string[] { "#ffffff", "#ffff00", "#db9791" })
                    )
                )
             )

BackColor()

Adds BackColor tool.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.BackColor())
             )

BackColor(System.Action)

Adds BackColor tool.

Parameters

configurator - System.Action<EditorColorPickerToolBuilder>

The action that configures the BackColor tool settings.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools
                    .BackColor(items => items
                        .Palette(new string[] { "#ffffff", "#ffff00", "#db9791" })
                    )
                )
             )

TableEditing()

Adds TableEditing tools.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.TableEditing())
             )

Separator()

Adds a separator.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.Separator())
             )

CleanFormatting()

Adds CleanFormatting tool.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.CleanFormatting())
             )

FormatPainter()

Adds FormatPainter tool buttons.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.FormatPainter())
             )

FormattingMarks()

Adds FormattingMarks tool.

Example


             @(Html.Kendo().Editor()
               .Name("Editor")
               .Tools(tools => tools.FormattingMarks())
             )

LineHeight(System.Action)

Adds LineHeight tool.

Parameters

configurator - System.Action<EditorDropDownItemBuilder>

The action that configures the LineHeight tool settings.

Example


             @( Html.Kendo().Editor()
                .Name("Editor")
                .Tools(tools => tools
                    .LineHeight(items => items
                        .Add("1", "10pt")
                        .Add("2", "20pt")
                        .Add("3", "30pt")
                    )
                )
             )

LineHeight()

Adds LineHeight tool.

Example


             @( Html.Kendo().Editor()
                .Name("Editor")
                .Tools(tools => tools
                    .LineHeight(items => items
                        .Add("1", "10pt")
                        .Add("2", "20pt")
                        .Add("3", "30pt")
                    )
                )
             )

In this article
Not finding the help you need?