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

Data format is lost on copying data from Microsoft word to Telerik RADEditor

8 Answers 66 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Nisheet
Top achievements
Rank 1
Nisheet asked on 06 Mar 2019, 11:07 AM

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

Sort by
0
Rumen
Telerik team
answered on 06 Mar 2019, 03:09 PM
What happens if you set the StripFormattingOptions property to NoneSupressCleanMessage? Does the uppercasing remain or not?

Can you provide a test Word file too?

Regards,
Rumen
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Nisheet
Top achievements
Rank 1
answered on 06 Mar 2019, 04:59 PM

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

0
Nisheet
Top achievements
Rank 1
answered on 06 Mar 2019, 05:19 PM

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

0
Rumen
Telerik team
answered on 06 Mar 2019, 07:21 PM
Hi,

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
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Nisheet
Top achievements
Rank 1
answered on 07 Mar 2019, 03:30 AM

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

0
Rumen
Telerik team
answered on 07 Mar 2019, 10:49 AM
Hi there,

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
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Nisheet
Top achievements
Rank 1
answered on 07 Mar 2019, 01:27 PM

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.

0
Rumen
Telerik team
answered on 08 Mar 2019, 08:44 AM
Hi Nisheet,

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
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Editor
Asked by
Nisheet
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Nisheet
Top achievements
Rank 1
Share this question
or