NewLineBr and paragraph tags for first paragraph

7 posts, 0 answers
  1. Rod
    Rod avatar
    18 posts
    Member since:
    Apr 2008

    Posted 18 Jul 2008 Link to this post

    Hi -

    I have the NewLineBr set to false, and the editor correctly wraps each paragraph in <p> tags - except the first paragraph.  Is there a way to get the editor to wrap the first paragraph in p-tags as well?

    Thanks,

    Rod
  2. Rod
    Rod avatar
    18 posts
    Member since:
    Apr 2008

    Posted 19 Jul 2008 Link to this post

    This problem crops up in Firefox only.  I also get an error showing up in Firebug:

    Permission denied to get property XULElement.accessibleType
    _7f7.close();

    Any ideas?

    Thanks,

    Rod
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 22 Jul 2008 Link to this post

    Hi Rod,

    The default behavior of the Enter command in Mozilla (Gecko) editors is to insert a <br> tag. In order to provide support for paragraph insertion under Firefox we made a custom implementation (NewLineBr="false") which has its limitations because of the different browser problems and behaviors. The observed behavior is a side effect of our code and it is not an easy task to workaround or fix it. The problem is logged in our ToDo list and if possible we will fix it in one of the future versions of RadEditor.

    In the meantime our suggestion is to set NewLineBr="true" which will insert the default <br> tags instead of <p> tags.

    In regards to the reported js error: we are not aware of it. Could you please, provide step-by-step instructions on how to reproduce the error and sample content for test? Are you able to reproduce it with the Futures build of RadEditor?


    Kind regards,
    Rumen
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  5. Jeff
    Jeff avatar
    51 posts
    Member since:
    Aug 2007

    Posted 20 Apr 2009 Link to this post

    I would like to see this fixed as well. I've even came up with a term to describe the phenomena: Orphaned text.

    This defined as text that is not enclosed by any tags and rightly belongs in a <p> tag.

    I also want to point out this is not limited to the first line. Once you have orphaned text, it can result in additional lines of orphaned text.

    Here's something I observed:

    1. Start with a completely empty editor.
    2. Type something on the first line and hit enter. This inserts a <br /> after the line.
    3. Type a second line of text and hit enter. This is properly enclosed in <p> tags.
    4. Press the down arrow. You are now on the line terminated by the <br /> inserted in step 2.
    5. Type some text and press enter. You have another line of orphaned text.
    6. Repeat steps 3 and 5 to get additional lines orphaned text.

    For my situation, the ideal fix is to prevent that <br /> from ever being created. Instead, after hitting enter on the first line, wrap it in <p> tags. This both prevents the cascade effect described above and properly encloses the first line in the p tag.

    It's quite possible I'm not considering all the factors in play here. If so, I'd like to hear why this solution wouldn't work.

    Thanks,
    Jeff
  6. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 23 Apr 2009 Link to this post

    Hello Jeff,

    Thank you for reporting this scenario too. I logged it for fixing and added additional Telerik points to your account for your assistance.

    Kind regards,
    Rumen
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  7. Addams
    Addams avatar
    10 posts
    Member since:
    Aug 2008

    Posted 04 May 2009 Link to this post

    I'm using the latest hotfix and with the latest version of Chrome it wraps text in div's.  If I perform steps 1-3 that Jeff described I end up with 2 lines surrounded by div's and a third line that has a "br" surrounded by a div.  Is this a known issue?
  8. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 11 May 2009 Link to this post

    Hi everyone,

    We have completed a new implementation for the NewLineBr = false mechanism for FireFox, which addresses the reported problems of the existing mechanism. The implementation will be a part of the next RadControls Service Pack to be released in a couple of weeks from now. You can also preview the functionality by grabbing the next public Internal Build of RadControls.

    Sincerely,
    Rumen
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017