An Editor can be created either by using a textarea
or div
element. In this recipe, we will create an Editor using a textarea
element and show you the default tools available for formatting the data.
Let's first create a textarea
element, specifying the number of rows, columns, and width:
<textarea id="editor" row="20" cols="80" style="width: 700px;"> </textarea>
The next step is to use this textarea
element and create an Editor by invoking the kendoEditor
function:
$("#editor").kendoEditor();
The kendoEditor
function is used to initialize textarea
as an Editor widget. The Editor will now have a WYSIWYG interface, allowing the user to format the text.