Opened 7 years ago

Closed 7 years ago

#16871 closed Bug (invalid)

paste from MS Word some text with background color

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


Steps to reproduce

  1. config.pasteFromWordRemoveFontStyles = true;
  2. paste from MS Word some text with background color

Expected result

<p>some text</p>

Actual result

<p><b><span style="background:white">Come text</span></b></p>

Other details (browser, OS, CKEditor version, installed plugins)

Browser: Chrome

OS: Mac

CKEditor version: 4.6.1

Change History (2)

comment:1 Changed 7 years ago by anbuece

CKEDITOR.on('instanceReady', function(ev) { ev.editor.on('afterPasteFromWord', function(evt) { =<span style="(["]*)">/g,); =<\/span>/g,); console.log(; }, null, null, 9); });

the above one solves the issue, but wanted to know why config.pasteFromWordRemoveFontStyles = true; not solving this issue. Also Is this a right approach to solve the issue.

Version 0, edited 7 years ago by anbuece (next)

comment:2 Changed 7 years ago by Jakub Ś

Resolution: invalid
Status: newclosed
Version: 4.7.0 (GitHub - major)

First of all you have reported 3 tickets concerning the same issue. Please keep the discussion in one ticket for the future.

Please read the documentation -!/api/CKEDITOR.config-cfg-pasteFromWordRemoveFontStyles. In CKEditor 4.6.0, new PFW filter has been introduced. From that version the filtering in that filter depends on ACF settings. If for some reason you don't want to use ACF, you can use afterPasteFromWord event like you did.

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