New to Telerik UI for ASP.NET CoreStart a free 30-day trial

Add a New Line instead of a New Paragraph in the Editor when Pressing Enter Key

Updated on Dec 10, 2025

Environment

ProductTelerik UI for ASP.NET Core Editor
Progress Telerik UI for ASP.NET Core version2024.4.1112

Description

How can I configure the Editor to add a new line instead of a paragraph when pressing the Enter key?

Solution

By default, the Editor adds a paragraph (p element) when the focus is in the Editor's content area and you press the Enter key. Pressing Shift + Enter adds a new line (br element). You can reverse the default behavior by customizing the Editor's tools.

  1. Add a script that customizes the insertLineBreak and insertParagraph tools. As a result, a new line is added when pressing the Enter key, and a paragraph is inserted by pressing Shift + Enter.
  2. Declare the Editor after the script tag with the custom logic.
JS
    <script>
        var editorNS = kendo.ui.editor,
            registerTool = editorNS.EditorUtils.registerTool,
            Tool = editorNS.Tool;
        registerTool("insertLineBreak", new Tool({ key: 13, command: editorNS.NewLineCommand }));
        registerTool("insertParagraph", new Tool({ key: 13, shift: true, command: editorNS.ParagraphCommand }));
    </script>

More ASP.NET Core Editor Resources

See Also