Opened 8 years ago

Last modified 7 years ago

#14921 confirmed Bug

Copy paste content in WYSIWYG 4.5.11 removes styles created using WYSIWYG, version 4.4.7 works fine

Reported by: aleks.kuc Owned by:
Priority: Normal Milestone:
Component: Core : Pasting Version: 4.5.0
Keywords: Cc:

Description

Steps to reproduce

  1. open http://ckeditor.com/demo
  2. go to Source view
  3. delete all content
  4. go to WYSIWYG view
  5. enter sample text: "Test"
  6. select text "Test" and apply by mouse click: bold, Styles: Inline styles: Marker, Paragraph Format: Heading 1
  7. copy all with Copy button
  8. open new tab http://ckeditor.com/demo
  9. repeat steps 2, 3, 4
  10. paste with Ctrl/Cmd+V
  11. pasted text "Test" has bold but Styles and Paragraph Format settings are missing (those are not the only one getting removed) in CKEditor 4.4.7 all the formatting was preserved.

Expected result

All styles created in WYSIWYG CKEditor version >4.4.7 should be preserved after copy&paste between different editor instances of the same version. Just like it was in CKEditor version 4.4.7.

Actual result

Various styles created in WYSIWYG CKEditor version >4.4.7 are getting removed after copy&paste between different editor instances of the same version.

Change History (5)

comment:1 Changed 8 years ago by aleks.kuc

Component: GeneralCore : Pasting

comment:2 Changed 8 years ago by aleks.kuc

I've checked just now, and 4.4.8 also works fine. Issue starts in version 4.5.0.

comment:3 Changed 7 years ago by Jakub Ś

Status: newconfirmed
Version: 4.5.114.5.0

I have just checked this issue and there are two issues I can see here.

Style loss:
Occurs in Chrome Webkit/Blink only. If you have created sample code like so <h1><span class="marker"><strong>test</strong></span></h1> and you copy/paste it from one editor instance to another - the inline style with marker class will be gone. This problem can be reproduced from CKEditor 4.5.0.

Selection issue:
Maybe a new ticket should be created from that.
Let's say you have created HTML according to original TC: <h1><span class="marker"><strong>test</strong></span></h1>. If you select this HTML in wysiwyg mode, using mouse (from right to left) and you copy that code into another editor the H1 will be lost. Problem can be reproduced from CKEditor 4.5.0 but some further explanation is needed.

In versions 4.4.8 and below you can make such selection, copy the content and paste it into all other CKEditor instances (4.5.0 and above included) and H1 will be preserved. The only exception is Edge where H1 is always lost.

In versions 4.5.0 and above you either need to select contents using Ctrl+A or press H1 on element's path in the editor. This is the only way to copy H1 in CKEditor 4.5.0+. This method will also work with edge.

It looks like, starting from CKE 4.5.0, some data is lost when selecting contents using mouse.

comment:4 Changed 7 years ago by Jakub Ś

It turns out we have quite a few issues with pasting and they all may be related as they all can be reproduced from 4.5.0:
Styles Stripping: #13860, #13926, #14250, #14358
Styles stripping on Chrome in various test cases: #14921, #14593, #13753, #13751, #16454
Weird event pasting relation (not sure): #13763
White spaces not preserved: #14614
Problem with pasting in LibreOffice: #14622 (we do not support it but I have added this issue because general solution might also bring back old behaviour).

Version 3, edited 7 years ago by Jakub Ś (previous) (next) (diff)

comment:5 Changed 7 years ago by Jakub Ś

#16882 was marked as duplicate.

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