tools.template String
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 template and pass variables to it. This allows template reusage or making tweaks on the fly.
Example using a Kendo UI template with variables
<script id="toolTemplate" type="text/x-kendo-template">
<button class='k-button'>#= myText #</button>
</script>
<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
tools: [
{
name: "custom",
myText: "Button Text",
template: $("#toolTemplate").html()
}
]
});
</script>