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

Table formatting is gone in copy/paste from MS Word to Kendo Editor

9 Answers 744 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Coolasia
Top achievements
Rank 1
Coolasia asked on 17 Mar 2016, 05:45 AM
I have a problem in copy/paste from MS word to Kendo Editor.
Copying only text is working fine. But when table is copied and pasted, all formatting is gone.
How can I solve this problem?

9 Answers, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 18 Mar 2016, 06:56 AM
Hi Coolasia,

I tried to reproduce the same with this online demo (http://demos.telerik.com/kendo-ui/editor/index), but to no avail.

On my end, when a table is copied from Word, the table and the text formatting is properly pasted.

On a side note, Kendo Editor does not implement functionality that somehow captures the pasted content and modify it. The data transferred through the clipboard is entirely depend on the browser and Kendo Editor cannot affect it so to somehow break the result.  

Regards,
Ianko
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Coolasia
Top achievements
Rank 1
answered on 18 Mar 2016, 08:46 AM

Hi Lanko,

I have tried the demo in chrome, firefox and also IE where I am not able to get the formatted pasted in editor.

From your side which browser did you test that you are able to copy the formatting to the editor?

Thanks,

Coolasia

0
Ianko
Telerik team
answered on 18 Mar 2016, 11:04 AM
Hello Coolasia,

I tested with Firefox on my end. You can see the results of the test in this screencast—http://screencast.com/t/I7y0ej8OBl.

Also, as mentioned, the actual result entirely depends on the browser used. So any content pasted might be different in terms of HTML in different browser. That said, I would to again inform that Kendo Editor does not handle the paste event and it does not affect somehow the content to be pasted. 

Regards,
Ianko
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Coolasia
Top achievements
Rank 1
answered on 21 Mar 2016, 02:34 AM

Hello lanko,

In the screencast which you sent I see that the text formatting is copied but if you see the table border is gone.

My question is about the table formatting, why the formatting is not getting copied, is this also due to browser compatibility?

Thanks,

CoolAsia

0
Ianko
Telerik team
answered on 22 Mar 2016, 02:30 PM
Hi CoolAsia,

Thank you for pointing me what to look for. 

I contacting the dev team about that. It appears that while pasting a table from MS Word, the content that the browser adds is invalid due to specific Word-related styles and values. This is why there is a feature implemented to clear almost all table formatting when pasting. 

In order to disable this feature you can follow the approach from this forum post—http://www.telerik.com/forums/copy-text-from-office-to-editor#FLGvPlFypkCy3MUT76wYwQ.

Regards,
Ianko
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Coolasia
Top achievements
Rank 1
answered on 23 Mar 2016, 11:19 AM

Hello lanko,

I have followed the step given the post but still the table is getting pasted without formatting.

I am calling the below script after the editor initialization.

var editor = $("[data-role=editor]").data("kendoEditor");
$(editor.body).off("paste");

but still not able to paste the table with formatting.

Can you send me some demo link for the above implementation.

Thanks,

CoolAsia

0
Ianko
Telerik team
answered on 25 Mar 2016, 07:14 AM
Hi CoolAsia,

Here you are a Dojo that shows the code in a runnable sample—http://dojo.telerik.com/IqUbI.

Regards,
Ianko
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Rishabh
Top achievements
Rank 1
answered on 26 Mar 2021, 10:42 AM

Team,

Excel table formatting not working, can you please support me to achieve it.

Please find attached screenshot for more understanding of this issue.

 

Thanks,

0
Ianko
Telerik team
answered on 29 Mar 2021, 05:23 AM

Hi Rishabh,

Typically, pasting from Excel is not 100% supported as it differs from MS Word pasting. You can check the feedback item here: https://feedback.telerik.com/kendo-jquery-ui/1507031-formatting-is-lost-after-pasting-from-excel

In your case, I see that the merged cells are not properly pasted. I assume you are using an older version of Kendo UI. With the latest version merged cells are pasted properly as the tools for merging cells have been added to the Editor.  

Check it out again with the latest version. If you have additional question please open a new thread or ticket on the topic as it is related to pasting tables with merged cells. 

Regards,
Ianko
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Editor
Asked by
Coolasia
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Coolasia
Top achievements
Rank 1
Rishabh
Top achievements
Rank 1
Share this question
or