Opened 8 years ago
Last modified 8 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
- open http://ckeditor.com/demo
- go to Source view
- delete all content
- go to WYSIWYG view
- enter sample text: "Test"
- select text "Test" and apply by mouse click: bold, Styles: Inline styles: Marker, Paragraph Format: Heading 1
- copy all with Copy button
- open new tab http://ckeditor.com/demo
- repeat steps 2, 3, 4
- paste with Ctrl/Cmd+V
- 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
Component: | General → Core : Pasting |
---|
comment:2 Changed 8 years ago by
comment:3 Changed 8 years ago by
Status: | new → confirmed |
---|---|
Version: | 4.5.11 → 4.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 8 years ago by
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).
I've checked just now, and 4.4.8 also works fine. Issue starts in version 4.5.0.