Edit this page

Start Typing in Unordered List in Editor

Environment

Product Editor for Progress Kendo UI

Description

How can I achieve the following behavior?

  1. Have the first bullet in a list to appear automatically.
  2. Type the data you need.
  3. 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>

See Also

Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy