This is a migrated thread and some comments may be shown as answers.

Extra line breaks added while copy -paste

1 Answer 196 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Harsh
Top achievements
Rank 1
Harsh asked on 26 Jul 2013, 01:39 PM
<telerik:RadEditor ID="rdEditor" EditModes="Design,Preview"   OnClientLoad="OnRadClientLoad()"
                                StripFormattingOptions="NoneSupressCleanMessage" StripFormattingOnPaste="NoneSupressCleanMessage"
                                Width="100%" Height="400px" runat="server" ToolsFile="../XML/BasicTools.xml">
                              
                                 <Tools>     
                                  
                                  
        </Tools>                             
         
                            </telerik:RadEditor>

rdEditor.Content

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.

Regards

1 Answer, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 30 Jul 2013, 03:54 PM
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.

Regards,
Ianko
Telerik
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.
Tags
Editor
Asked by
Harsh
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Share this question
or