Add <p> tag after pressing enter key in <h2> tag al last text

2 posts, 0 answers
  1. Neha
    Neha  avatar
    18 posts
    Member since:
    Feb 2014

    Posted 21 Jun 2014 Link to this post

    Hello ,

    I want that when the pressing enter key at the last of the heading tag then i want to add a <br/> at the last but the editor add the new <p> tag

    For Example:

    <h2>demo test</h2>
    <p>Demo paragraph</p>

    Then I pressing enter key at the last of the <h2> tag like after the :
    "demo test "pressing enter key here" " 
    then he editor will show the content like this:

    <h2>demo test</h2>
    <p>demo paragraph></p>

    but i want the result like this:
    <h2>demo test <br/></h2>
    <p>demo paragraph></p>

  2. Ianko
    Ianko avatar
    1738 posts

    Posted 23 Jun 2014 Link to this post

    Hi Neha,

    The RadEditor cotnrol's new line mode is changed to add paragraphs by default in 2014 Q2 version.

    This is done to provide a behavior more consistent and more desktop feel of text editing (e.g. MS Word). In most browser you should be able to still add a BR (carriage return) using the Shift+Enter shortcut, just like in MS Word.

    To revert to the previous behavior you can set the NewLineMode="Br" property and force the editor top add BRs on each Enter press.  Note that in this case the user can add P elements only using the Insert Paragraph tool or in using the Ctrl+Enter shortcut.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top