9 Answers, 1 is accepted
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
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
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
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
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
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
Here you are a Dojo that shows the code in a runnable sample—http://dojo.telerik.com/IqUbI.
Regards,
Ianko
Telerik
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,
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.