ckeditor / ckeditor4

The best enterprise-grade WYSIWYG editor. Fully customizable with countless features and plugins.
https://ckeditor.com/ckeditor-4
Other
5.79k stars 2.47k forks source link

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

Open alekskuc opened 4 years ago

alekskuc commented 4 years ago

Type of report

Bug

Provide detailed reproduction steps (if any)

  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.

Other details

Reposting from https://dev.ckeditor.com/ticket/14921

Comandeer commented 4 years ago

I can confirm the issue:

radcloudcorp commented 1 year ago

I managed to solve it by adding to config.js the line config.pasteFilter = null; I tested it in Firefox and found that it works normally and in chrome the formatting was being lost.