Opened 9 years ago
Last modified 8 years ago
#13623 confirmed New Feature
Improve copy and paste from Office applications (particularly Excel & Powerpoint)
Reported by: | Christophe Guillou | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | |
Keywords: | IBM | Cc: | Satya Minnekanti, Irina, giogio, inga |
Description
When copying an excel or powerpoint content into CKEditor, rich content is lost.
Customers want to copy it as an embedded object, so that the original content can be edited.
Change History (9)
comment:1 Changed 9 years ago by
comment:2 Changed 9 years ago by
Status: | new → confirmed |
---|---|
Version: | 4.4.8 |
We can keep this feature open for future reference. I think it describes briefly what is expected.
Previous ticket for MS Excel support is bug marked as "Won't Fix" (#6465). I think it will be better to have a feature request with appropriate comment.
That said, currently only IE handles content from MS Excel pretty well. Other browsers see raw HTML at best.
From CKEditor point of view there is not much you can do. You can set below code but it will mainly improve pasting from Word and IE.
var editor = CKEDITOR.replace( 'editor1', { extraAllowedContent : 'tags, styles, attributes and classes of your choice', pasteFromWordRemoveFontStyles : false, pasteFromWordRemoveStyles : false });
Another reason why I have mentioned above code is because, as someone has noticed, when you paste content from MS Excel first into MS Word and then Copy/Paste it into Editor formatting may be preserved.
I know this is two step process but until browsers provide better support for that type of data, there is nothing we can do.
However, since we switched to clipboard API on Chrome and Firefox on Mac (Firefox on Windows must still use the pastebin because of Firefox bug) there's a chance to do something more.
Actually Google Sheets recognizes styles nicely in Firefox and in Chrome. I'm not sure if they are using Cliboard API but perhaps we could use something similar in CKEditor 4 or CKEditor 5.
comment:3 Changed 9 years ago by
Summary: | Improve Copy & Paste from Office apps (particularly Excel & Powerpoint) → Improve copy and paste from Office applications (particularly Excel & Powerpoint) |
---|
I made a quick check, because previously (before 4.4.8) there was no chance to improve support for pasting from Excel because there wasn't any more data in the pastebin. So that were browses who would have to improve this.
However, since we switched to clipboard API on Chrome and Firefox on Mac (Firefox on Windows must still use the pastebin because of Firefox bug) there's a chance to do something more. We now can access content that's outside of the <body> element in the data available in the clipboard and styles like font colors and perhaps borders too are kept in the <head> element inside a stylesheet. However, matching selectors would be very tricky, so this perhaps is doable but may be very hard to implement. I'm not sure that the effort is reasonable taking into account that only users of Chrome and Firefox@Mac would feel any difference.
I didn't check Power Point, so I'm not sure if we can do more here.