This is a migrated thread and some comments may be shown as answers.

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

1 Answer 30 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Neha
Top achievements
Rank 1
Neha asked on 21 Jun 2014, 10:07 AM
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></p>
<p>demo paragraph></p>

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

1 Answer, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 23 Jun 2014, 06:25 AM
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.

Regards,
Ianko
Telerik
 

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.

 
Tags
Editor
Asked by
Neha
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Share this question
or