tools.template String|Function

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

Example using a simple string template

<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
  tools: [
    {
      name: "custom",
      template: "<button class='k-button'>Save draft</button>"
    }
  ]
});
</script>

The code below shows how to use a function template.

Example using a function template

<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
  tools: [
    {
      name: "custom",
      template: function() {
        return "<button class='k-button'>Save draft</button>"
      }
    }
  ]
});
</script>
In this article