Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#11976 closed Bug (fixed)

Copy&paste and drag&drop lists from MS Word to Chrome.

Reported by: Piotr Jasiun Owned by: Piotrek Koszuliński
Priority: Normal Milestone: CKEditor 4.5.0
Component: General Version: 4.5.0 Beta
Keywords: Cc:

Description (last modified by Piotrek Koszuliński)

After we switched to a direct access to clipboard pasting lists from MS Word does not work.

Note: Initially this ticket included also few other cases related to lists DnD. They were split to other tickets.

Attachments (1)

stupid-word.docx (23.4 KB) - added by Piotrek Koszuliński 3 years ago.

Download all attachments as: .zip

Change History (16)

comment:1 Changed 4 years ago by Piotr Jasiun

Status: newconfirmed

comment:2 Changed 4 years ago by Piotr Jasiun

Description: modified (diff)

comment:3 Changed 3 years ago by Piotr Jasiun

This issue is still valid.

Bug 12

Browsers: Chrome, works fine on IE 11.

Dropping Lists from MS Word into editor results into first element being dropped correctly. All rest looks like “<> item2item3item4” Just create list with 4 items, select it with mouse or Ctrl+A and drag it into editor.

If you drop a list from MS Word to CKEditor with native D&D support you also get crappy result.

Bug 19

Fixed.

Bug 21

Browsers: IE10, IE11, works fine on Chorme HTML List selected from sample page (outside of editor) and dropped into empty editor (for simplicity) results in simple text.

comment:4 Changed 3 years ago by Jakub Ś

NOTE: Bug 12 you have mentioned has same TC and #11376 however issue mentioned in #11376 is only reproducible in IE11.

comment:5 Changed 3 years ago by Piotr Jasiun

Milestone: CKEditor 4.5.0 Beta

comment:6 Changed 3 years ago by Piotr Jasiun

About droping/pasting content from Word (Bug 12).

On Chorme:

  • drop and paste broken the same way: a lot of if and endif in the dataVaule and the result HTML is < >item2item3,

On Firefox:

  • paste works perfectly fine,
  • drop only looks fine, but in fact it is:
    &bull;&nbsp;&nbsp; &nbsp;item1<br />
    &bull;&nbsp;&nbsp; &nbsp;item2<br />
    &bull;&nbsp;&nbsp; &nbsp;item3<br />
    

Instead of real list.

On IE11:

  • the same as Firefox.

On IE8:

  • paste is almost fine, but I have no idea where this anchor comes from.
    <ul>
    	<li>item1<a name="_GoBack"></a></li>
    	<li>item2</li>
    	<li>item3</li>
    </ul>
    
  • I was not able to test D&D, because Word Viewer which I use on the machine I have IE8 does not support it.

Also note that lists, headers and formatting is paste correctly in all cases without drop on Firefox/IE11.

comment:7 Changed 3 years ago by Piotr Jasiun

Owner: set to Piotr Jasiun
Status: confirmedreview

Fixed paste from Word on Chrome. Changes in t/11976. Because Bug 21 is still valid it should be moved to the separate ticket.

Last edited 3 years ago by Piotr Jasiun (previous) (diff)

comment:8 Changed 3 years ago by Piotr Jasiun

After a while I realized that because of IE limitations we are able to get external data only as a plain text and this is limitation we already accepted so we are not able to fix bug 21 and we can close this ticket after closing bug 12.

comment:9 Changed 3 years ago by Piotrek Koszuliński

Milestone: CKEditor 4.5.0 BetaCKEditor 4.5.0
Status: reviewreview_failed
Version: 4.5.0 (GitHub - major)

PFW tests fail on FF. It's too late in 4.5.0 beta for a change that once surprised us, so I'm changing the milestone to 4.5.0.

comment:10 Changed 3 years ago by Piotr Jasiun

Status: review_failedreview

Regexp was too generic. Fixed on the same branch.

comment:11 Changed 3 years ago by Piotrek Koszuliński

Status: reviewreview_failed

And now there was a bug in the regexp. I fixed it and... I cannot paste list on Firefox anymore.

I checked that on Firefox we also get different "HTML" from clipboard than from pastebin. Those pseudo comments are also there, but they look differently. So there are two issues at the same time:

  1. We do not clean these comments appropriately because I can see them later in the paste's dataValue.
  2. An error is thrown.

I attached file which I tests. I would also attach HTML, but someone decided that on Firefox's console only exceprts from console.logs are visible and I cannot get the full HTML ;/.

Changed 3 years ago by Piotrek Koszuliński

Attachment: stupid-word.docx added

comment:12 Changed 3 years ago by Piotrek Koszuliński

Owner: changed from Piotr Jasiun to Piotrek Koszuliński
Status: review_failedassigned

comment:13 Changed 3 years ago by Piotrek Koszuliński

Status: assignedreview

I pushed branch :t/11976 with one more commit. On FF we get the same HTML as on Chrome, but for some reasons this HTML was breaking the filter. Simple change in it prevents the error and the result is correct.

comment:14 Changed 3 years ago by Piotr Jasiun

Resolution: fixed
Status: reviewclosed

Ok, so pasting in Chrome and Firefox works fine, dropping in Chrome too, so I believe it is good moment to close this tickets and move remaining problems to separate tickets: #13357, #13356, #13358.

Closed with git:2a4748a. Finally.

comment:15 Changed 3 years ago by Piotrek Koszuliński

Description: modified (diff)
Summary: Fix D&D for listsCopy&paste and drag&drop lists from MS Word to Chrome.
Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy