New to Kendo UI for jQueryStart a free 30-day trial

Change the Editor New-Line Mode from a P to a Br Tag

Environment

ProductProgress® Kendo UI® Editor for jQuery
Operating SystemWindows 10 64bit
Visual Studio VersionVisual Studio 2017
Preferred LanguageJavaScript

Description

How can I change the default new-line behavior from inserting <p> tag to <br> tag in the Kendo UI for jQuery Editor?

Solution

The following example demonstrates how to achieve the desired scenario.

  <textarea id="editor"></textarea>
  <script>
    var defaultTools = kendo.ui.Editor.defaultTools;

    defaultTools["insertLineBreak"].options.shift = false;
    delete defaultTools["insertParagraph"].options;
    $("#editor").kendoEditor();
  </script>

See Also