We are using a RADEditor in our solution with StripFormattingOptions attribute: StripFormattingOptions="MSWordNoMargins, ConvertWordLists, MSWord ". However, when content from a Microsoft word file is copied and pasted in the editor it loses its format. For example, Upper Case content is converted into lower case. I have tried multiple combinations of StripFormattingOptions attribute but still, the problem persists.
One more point is that the behavior here is random, i.e. sometimes the format is maintained while sometimes it is lost. There is no specific format or case where this problem occurs. Hence, unable to identify the root cause as well.
Request you to please assist for the same.
8 Answers, 1 is accepted
Can you provide a test Word file too?
Regards,
Rumen
Progress Telerik

Even after using "NoneSupressCleanMessage" the casing is not preserved and the format is lost. The forum is not allowing me to attach the file. Please guide me that how shall I share it.
Regards,
Nisheet

Attaching the Word Doc content and the RADEditor output screenshots for your reference. The orange box content in the Word Doc screenshot loses its format and the green box content in the Word Doc screenshot loses casing.
Regards,
Nisheet
If the formatting is not preserved even when the NoneSupressCleanMessage is set, this means that it is not provided by the browser/OS clipboard.
Can you send me the file to rumen.zhekov at progress.com?
In the meantime you can paste it in an editable div/iframe (which is actually the content area of RadEditor) and see whether the formatting is preserved or not. Here is a test dojo project: http://dojo.telerik.com/@nlazarov/IFIPAR.
Regards,
Rumen
Progress Telerik

Hi Rumen,
I have sent you the file for which formatting and casing are lost on copy-paste. Also, I have tried pasting the data in the DIV/IFrame of the test dojo project but there also the formatting and casing are lost.
Regards,
Nisheet
The fact that the formatting is not preserved when pasting the content in an editable iframe/div means that this feature is still not supported by the browser and the formatting is not converted to a valid HTML/CSS which the browser understands and can render. You can find more information and explanation in the following article: RadEditor and the Browser Clipboard.
Regards,
Rumen
Progress Telerik

Thanks a lot, Rumen for answering my query. Just one more confirmation, so as per your answer it means that RadEditor will not preserve the format due to browser's limitation to convert it into valid HTML/CSS. I am currently using Google Chrome.
Is there any browser with any specific version which supports proper conversion to HTML/CSS for the word document content. Or the only way to preserve the format is to edit the content format in the RadEditor itself.
For the past years many of the browsers improved the conversion from Word to HTML. In the past a lot of junk HTML like <o:p>, mso tags and attributes came from the clipboard when pasting from MS Word, but now the things change for good and we can expect even better support for Word in the future.
Presently, there isn't a 100% nicely working paste from Word, but usually the Microsoft browsers play a bit better with Word since it is a Microsoft product. This does not mean that everything will come 1:1 from Word but you can test.
It depends on the content of the Word file too. If they are created in Word they might be converted better, but if they are pasted from another program in Word, the contents might be malformed and mangled and this can cause troubles too.
Best regards,
Rumen
Progress Telerik