Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#12946 closed Bug (invalid)

Copying word content on different browsers

Reported by: pdolega Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:

Description

Issue below happens on 4.4.7 version but I was able to reproduce it directly on demo page here: http://ckeditor.com/demo

I have been trying to copy and paste the contents of the Word file. Word is attached to this ticket.

Generally on Chrome 40.0.x it works correctly - here is the result: http://pbrd.co/1CGXRMe The problem occurs however on FF 30 (also IE 11 and also possibly further versions): http://pbrd.co/1CGXW2z It seems that numbering is being broken as a result of this operation.

The same thing happens if I use Paste from MS Word option - although here it initially looks ok (here: http://pbrd.co/1CGXYHI ) after it still gets broken after pressing OK: http://pbrd.co/1CGY4yZ

Attachments (1)

lista.docx (13.9 KB) - added by pdolega 10 years ago.
docx file for reproducing problem

Download all attachments as: .zip

Change History (4)

Changed 10 years ago by pdolega

Attachment: lista.docx added

docx file for reproducing problem

comment:1 Changed 10 years ago by Jakub Ś

Keywords: word numbering table removed
Resolution: invalid
Status: newclosed
Version: 4.4.7

Result is the same on Chrome and Firefox. Please refresh your browser’s cache. I can't confirm that result looks 1:1 when pasting with Chrome thus i will have to close this ticket as invalid.


Please note that in all cases, the editor privileges semantics over formatting, so the end results will never look like the original.
CKEditor makes it best to translate the information send from Word through the clipboard and many times it needs to come to an agreement. In those cases we prioritize semantics instead of formatting.

In short - we have word formatted HTML and browser HTML which are two different things (only similar) and result will never look 1:1.


One thing that you will not overcome, are lists you have used for numbering. In word there is possibility to continue numbering in each new cell. In HTML you can't split list between cells. In each cell a new list is created. That is why you see 1. in all cells.

Sure there might be code that looks at cell above and takes next number but once you start editing such table, remove or insert rows it may get pretty messy and writing huge code for such small thing doesn't quite fit here.
The best solution here is not using lists for numbering cells in MS Word.


What you can do:

comment:2 Changed 10 years ago by pdolega

First of all - thanks for the thorough answer. This is really helpful.

One thing I don't understand [citation follows]: ` Result is the same on Chrome and Firefox. Please refresh your browser’s cache. I can't confirm that result looks 1:1 when pasting with Chrome thus i will have to close this ticket as invalid. `

Does this mean that you cannot reproduce the problem or that two pasted images are the same ? (they are not - look at the numbering in the first column).

I'll also take a look at suggested solutions (thanks!).

So from what I understand - it seems that the whole thing working on Chrome is incidental - it shouldn't work in general (numbering scattered across multiple cells) ?

Last edited 10 years ago by pdolega (previous) (diff)

comment:3 Changed 10 years ago by Jakub Ś

Comment was unclear. I'm sorry.

What I have meant is that results were the same in Firefox and Chrome and both were different than in MS Word.

I'm not sure how have you managed to get almost or same look as in MS Word but in default editor and default Chrome (without any custom plugins and without any modifications) result is quite different.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy