Paragraph Tag rather than BR

Posted by Community Admin on 03-Aug-2018 19:25

Paragraph Tag rather than BR

All Replies

Posted by Community Admin on 22-Mar-2012 00:00

When I am working with the radeditor (Content Block, Events, etc), how can I set it to put a new paragraph tag in when I press the return (enter) key?  Right now it inserts a BR.

Posted by Community Admin on 26-Mar-2012 00:00

Hey,
You can go to Settings->Advanced->Appearance and uncheck the Rad Editor new line 'br' tags checkbox. Then restart the site.

Posted by Community Admin on 27-Mar-2012 00:00

Hi James,

I see that Kalvin has pointed you to the property which can be changed. I just wanted to make a bit of clarification in addition to Kalvin's post.

In Sitefinity 4.4 hitting Enter key wrapped the paragraph in <p> tags and was default behavior of the editor. This behaviour was changed due to the fact that there were many requests for having <br> instead of <p> tags when hitting Enter.  However, Telerik RadEditor's has a NewLineMode property, which specifies whether it inserts a new line (<br /> tag), a new paragraph (<p> tag) or a div (<div> tag) when the Enter key is pressed. If it's value is set to "Br", pressing enter will add a line break (a </br> tag). I'm attaching a custom template for the editor with NewLineMode set to "P". You need to add it to your project and then register it in Settings -> Advanced -> Controls -> ViewMap -> Create new. Then just fill the form as in the screenshot.

Please follow the link for more information about using the NewLineMode property. The following demo may be also useful.

Also, keep in mind that If you decide to keep the default configurations of your editor, you can insert <p> tag with shift+enter.

Regards,
Victor Velev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 10-Feb-2013 00:00

It's bad HTML/XML formatting not to properly wrap your content. You say it was changed due to the number of requests to change it, but I wonder how many people would have requested NOT to change it if they knew they had to make such a request. I'd like to be at least one voice to say that defaulting to <br /> is a much worse way to handle content and I would like <p /> to be the standard means of handling basic content. I've made this switch but it appears that every time we update our sites, the switch is un-flipped again.

Posted by Community Admin on 14-Feb-2013 00:00

Hello Ben,

Thank you for your notes - your feedback is valuable to us and we will consider the situation - if there are more users wishing such change we will consider making further changes to the default behaviour.

Kind regards,
Victor Velev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 06-Dec-2013 00:00

how do you change this in sitefinity 6?

we want paragraphs not brs for new lines.

Posted by Community Admin on 11-Dec-2013 00:00

Hi Kele,

Please refer to the answer Victor provided: http://www.sitefinity.com/developer-network/forums/general-discussions-/paragraph-tag-rather-than-br#5TN5Xehc2UCEat7QS9Liww

In Sitefinity 6, you can do the same: Create new custom HTMLField template (you can use the one Victor provided) and then create ViewMap.

Regards,
Kristian Smilenov
Telerik

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed