Start Typing in Unordered List in Editor
Environment
Product | Progress® Kendo UI® Editor for jQuery |
Description
How can I achieve the following behavior?
- Have the first bullet in a list to appear automatically.
- Type the data you need.
- Open a new bullet line by pressing the
Enter
key after you finish typing.
Solution
Handle the select
event of the widget and execute the insertUnorderedList
command.
<textarea id="editor"></textarea>
<script>
var shouldInsertList = true;
$("#editor").kendoEditor({
// Implement an event handler for the select event
select: function(e) {
// Set initially the Editor to start an unordered list
if(shouldInsertList) {
shouldInsertList = false;
e.sender.exec("insertUnorderedList");
}
}
});
</script>