Opened 8 years ago

Closed 8 years ago

#13770 closed Bug (invalid)

extraAllowedContent does not work on copy-paste

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


Steps to reproduce

  1. Download the standard package of latest version (4.5.3)
  2. edit config.js and add the following line:

config.extraAllowedContent = 'div{margin*}';

  1. Change the editor to source edit mode and copy the following html content into the editor:

<p>test</p> <div style="margin-top:50px">test</div>

  1. Exit the source edit mode and you will see the margin, which is correct. Then copy the whole content, refresh the page, and paste it back to the editor (not source edit mode).

Expected result

The margin should be there.

Actual result

There's no margin. It's filtered out.

Change History (1)

comment:1 Changed 8 years ago by Jakub Ś

Keywords: extraAllowedContent paste removed
Resolution: invalid
Status: newclosed
Version: 4.5.3

I have checked standard version wil latest CKEditor 4.5.3 version and didn't get any problems. I have modified tried adding extraAllowedContent in config.js as well as in instance configuration. Both worked as expected.

@leoyang the only thing that comes to my mind is that you haven't cleared browser's cache properly (this isn't Ctrl+F5) or perhaps entered the rule outside of editorConfig function:

CKEDITOR.editorConfig = function( config ) {
config.extraAllowedContent = 'div{margin*}'; //e.g. here
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