state

Get the state of a given tool. Introduced in the 2013.2.923 internal build.

Parameters

toolName String

The name of the tool that will be tested if formatted.

Returns

Boolean The state of the tool.

Example

<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor();
var editor = $("#editor").data("kendoEditor");
editor.value("<em>foo</em>");
var range = editor.createRange();
range.selectNodeContents(editor.body.firstChild);
editor.selectRange(range);
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(editor.state("italic")); // logs true
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(editor.state("bold")); // logs false
</script>
In this article