I have a problem with Editor. When I copy content from word and paste it in the Editor (Ctrl+V) in our website line height automatically changes even if I set the StripFormattingOptions property to ‘NoneSupressCleanMessage’.
I have also tried this on telerik’s demo site and the issue occurs there as well:
See the snapshot of the original document and the content after pasting in the radeditor
You can see that in the html mode the line height is being set to 115%. The line height should have been identical to that in MS Word
Please I need this issue to be solved ASAP.
I have attached the snapshots of the site and word file
7 Answers, 1 is accepted
When StripFormattingOptions property is set to NoneSupressCleanMessage, RadEditor does not pass the pasted content through the stripping filters. Therefore, the described behavior is entirely depended on the browser.
In order to configure RadEditor to properly clean-up MS Word content you should either leave the default options of the StripFormattingOptions property or configure it based on your needs. You can read more about pasting in RadEditor here—http://docs.telerik.com/devtools/aspnet-ajax/controls/editor/managing-content/pasting-content/overview.
I found that you are right. The line height is indeed browser dependent. That being said, can you please provide a custom code that solves this problem and matches the line height of the content pasted in the Editor to that in the MS Word document.
I am not quite sure what custom code could achieve the required results. When it comes to custom solutions, it is best for them to be implemented manually so to best fit the scenario there is.
Since there are built-in options regarding pasting from MS Word, I can definitely recommend them for the job. Please, follow the link provided in my previous post.
Hi i have tried the various pasting options and have also tried all the StripFormattingOptions including 'None' but the line height remains inconsintent with that in the MSWord document. I also tried various combinations for StripFormattingOptions including ' ConvertWordLists + MSWordNoMargins' but the problem still persists. Kindly help me with a solution as it is very crucial.
The only possible way is to investigate why and what HTML code is generated on pasting so that the empty lines appear. Further, you can create you own logic to strip out the not needed HTML by using the pasteHtml event—http://docs.telerik.com/devtools/aspnet-ajax/controls/editor/client-side-programming/events/onclientpastehtml.
1. 'None'. But this gives a dialogBox every time i copy from MSWord and paste into the Editor.
2.Combination of 'ConvertWordList' and 'MSWordNoMargin'. But this disturbs the margins of the content.
Now is there a way that onclientpastehtml can be called without getting a DialogBox every time and not disturbing the margins??
You can try using MSWord and ConvertWordLists options only.