<kendo:editor-tool>

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.

Example

<kendo:editor-tools>
    <kendo:editor-tool></kendo:editor-tool>
</kendo:editor-tools>

Configuration Attributes

columns float

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

Example

<kendo:editor-tool columns="columns">
</kendo:editor-tool>

exec java.lang.String

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

Example

<kendo:editor-tool exec="exec">
</kendo:editor-tool>

name java.lang.String

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

Example

<kendo:editor-tool name="name">
</kendo:editor-tool>

palette java.lang.Object

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.

Example

<kendo:editor-tool palette="palette">
</kendo:editor-tool>

template java.lang.String

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

Example

<kendo:editor-tool template="template">
</kendo:editor-tool>

tooltip java.lang.String

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

Example

<kendo:editor-tool tooltip="tooltip">
</kendo:editor-tool>

ui java.lang.Object

Apart from the built-in tools, the Editor fully exposes the ToolBar.items API. This way you can specify any custom tools in the widget using the components available in the ToolBar itself.All tools must have their name specified. All custom tools with no name will have "custom" automatically assigned as their name. As a result only one of them will be placed in the Editor ToolBar.

Example

<kendo:editor-tool ui="ui">
</kendo:editor-tool>

Configuration JSP Tags

kendo:editor-tool-items

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

More documentation is available at kendo:editor-tool-items.

Example

<kendo:editor-tool>
    <kendo:editor-tool-items></kendo:editor-tool-items>
</kendo:editor-tool>

Event Attributes

exec String

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

Example

<kendo:editor-tool exec="handle_exec">
</kendo:editor-tool>
<script>
    function handle_exec(e) {
        // Code to handle the exec event.
    }
</script>

template String

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

Example

<kendo:editor-tool template="handle_template">
</kendo:editor-tool>
<script>
    function handle_template(e) {
        // Code to handle the template event.
    }
</script>

Event Tags

kendo:editor-tool-exec

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

Example

<kendo:editor-tool>
    <kendo:editor-tool-exec>
        <script>
            function(e) {
                // Code to handle the exec event.
            }
        </script>
    </kendo:editor-tool-exec>
</kendo:editor-tool>

kendo:editor-tool-template

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

Example

<kendo:editor-tool>
    <kendo:editor-tool-template>
        <script>
            function(e) {
                // Code to handle the template event.
            }
        </script>
    </kendo:editor-tool-template>
</kendo:editor-tool>
In this article
Not finding the help you need?