Change the Editor New-Line Mode from a P to a Br Tag
Environment
Product | Progress® Kendo UI® Editor for jQuery |
Operating System | Windows 10 64bit |
Visual Studio Version | Visual Studio 2017 |
Preferred Language | JavaScript |
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>