Odd paragraph formatting from plain text

2 posts, 0 answers
  1. MakeMedia
    MakeMedia avatar
    7 posts
    Member since:
    Jun 2009

    Posted 30 Jul 2009 Link to this post

    Hi there


    We’re pretty new to RadEditor, however, we’re seeing some inconstancies when pasting plain text paragraphs into the editor.


    Anyway, sometimes when I paste (ctrl v paste) three plain text paragraphs  the resulting HTML paras will be wrapped in <p> tags, some times there will be no <p> tags and the lines will be separated with <br /> tags and sometimes one paragraph will have <p>’s and another will not.


    I’m assuming there is a setting I can configure to produce consistent results?!


    Historically clients have a habit of messing up the formatting when using Rich Text editors so our advise is always ‘paste to plain text then paste to the editor’, hence the question.


    Many thanks



  2. Rumen
    Rumen avatar
    14323 posts

    Posted 31 Jul 2009 Link to this post

    Hi Stephen,

    RadEditor does not modify the pasted content by changing or replacing some tags for example replacing the <p> tags with <br> tags. RadEditor can be configured only to strip some special Word tags, attributes or formatting by setting the StripFormattingOnPaste property as it is demonstrated in this live demo: Cleaning Word Formatting.

    If you would like to modify the pasted content manually using regular expressions or DOM code then you can attach to the editor's OnClientPasteHtml property event and get and modify the pasted content.
    You can also modify the content with custom content filters, which are executing when switching between the editing modes or submitting the content.

    Best regards
    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