+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Paragraph Tag rather than BR

Paragraph Tag rather than BR

7 posts, 1 answered
  1. WebGeek
    WebGeek avatar
    186 posts
    Registered:
    20 Dec 2006
    22 Mar 2012
    Link to this post
    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.
  2. KMac
    KMac avatar
    133 posts
    Registered:
    15 Dec 2008
    26 Mar 2012
    Link to this post
    Hey,
    You can go to Settings->Advanced->Appearance and uncheck the Rad Editor new line 'br' tags checkbox. Then restart the site.
  3. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    27 Mar 2012
    Link to this post
    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
    Answered
  4. Ben
    Ben avatar
    1 posts
    Registered:
    10 Dec 2012
    10 Feb 2013
    Link to this post

    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.

  5. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    14 Feb 2013
    Link to this post
    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
  6. kele
    kele avatar
    10 posts
    Registered:
    05 Nov 2013
    06 Dec 2013
    Link to this post
    how do you change this in sitefinity 6?

    we want paragraphs not brs for new lines.
  7. Kristian Smilenov
    Kristian Smilenov avatar
    32 posts
    Registered:
    18 Mar 2015
    11 Dec 2013
    Link to this post
    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
7 posts, 1 answered