Extra line breaks added while copy -paste

2 posts, 0 answers
  1. Harsh
    Harsh avatar
    4 posts
    Member since:
    Sep 2012

    Posted 26 Jul 2013 Link to this post

    <telerik:RadEditor ID="rdEditor" EditModes="Design,Preview"   OnClientLoad="OnRadClientLoad()"
                                    StripFormattingOptions="NoneSupressCleanMessage" StripFormattingOnPaste="NoneSupressCleanMessage"
                                    Width="100%" Height="400px" runat="server" ToolsFile="../XML/BasicTools.xml">


    The above is what I have used to configure RadEditor and am reading the html from  rdEditor.Content property
    For some cases it works fine ie no extra line breaks are added while copying from microsoft word file .docx
     .  But in some case extra line breaks are added . I tried the solution ie adding ContentFilters=none but this remove even the valid line breaks

    The strange part is that in preview mode it does not show any line breaks 

    Would appreciate a quick response since thew issue is in production enviornment.

  2. Ianko
    Ianko avatar
    1896 posts

    Posted 30 Jul 2013 Link to this post

    Hi Harsh,

    In addition to paste Word content correctly you could modify the StripFormattingOptions property to a different value. Thus the NoneSupressCleanMessage disables all stripping options, the MSWord value is an appropriate one for the mentioned scenario.

    You could find more information about the stripping options:

    Note that the StripFormattingOnPaste is obsolete and I would recommend you removing it, because the StripFormattingOptions acts with the same functionality and this way you should avoid any possible issues with the RadEditor.
    The content filter does not implement the functionality to strip text content, but HTML content instead. Possible usage of the ContentFilters property is to modify the output HTML markup from the editor.

    Please let me know If I can help you further about issues with our products.

    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top