Opened 6 years ago

Closed 5 years ago

#10496 closed Bug (duplicate)

ACF blocks/overrides coreStyles_ behaviour on paste

Reported by: Jakub Ś Owned by:
Priority: Normal Milestone:
Component: General Version: 4.1
Keywords: Cc: kagupta@…

Description (last modified by Piotrek Koszuliński)

To reproduce:

  1. Use below code for editor:
    CKEDITOR.replace( 'editor1', {
    	coreStyles_bold: { element: 'b', overrides: 'strong' },
    	allowedContent: true
  1. try to paste HTML containing strong tag (you can paste sample text from other editor, even other browser).
  • Result: strong tag is left untouched on paste.
  • Expected: strong tag should be transformed to b tag.

While coreStyles_* work well with initial content (strong tags are transformed to b) and when e.g. Bold is pressed (b tag is inserted), they fail when content is pasted.

Please also note if you remove allowedContent: true property all works as expected.

Problem can be reproduced from CKEditor 4.1.

Change History (7)

comment:1 Changed 6 years ago by Jakub Ś

Status: newconfirmed

comment:2 Changed 6 years ago by Jakub Ś

Cc: kagupta@… added

comment:3 Changed 6 years ago by Piotrek Koszuliński

Description: modified (diff)

comment:4 Changed 5 years ago by Stuart L.

This is still occurring in 4.3 . Ran into the same issue because we've set allowedContent: true for a plugin to work and then anytime you modify a normal basicstyles (sup, sup, s, em, strong) tag, it fails to remove that style from the toolbar. It recognizes it is of that type, but won't do any overrides. Removing the allowedContent line fixes it as well.

Any ideas on working around this or a setting to override to get it to work correctly?

comment:6 Changed 5 years ago by Piotrek Koszuliński

As far as I remember before 4.1 it didn't work either. ACF introduced content normalization on data insertion.

So, it's not really a bug. Currently we disable entire ACF when allowedContent is set to true. I think that what you want is possibility to disable filtering, but keep data normalization. Am I right?

@stuartlawder: Could you describe your TC more clearly? I'm not sure if we're thinking about the same thing.

comment:7 Changed 5 years ago by Stuart L.

Here's the issue I'm seeing with allowedContent:true set:

The top editor is Example #2 on the datafiltering example in samples of the latest build download. I tweaked example #3 to be allowedContent:true . I think you're correct in assuming it should disable filtering be keep normalization.

Also, the plugin that requires allowedContent:true is the oEmbed plugin ( I'll add an issue for them to look into better ACF integration.

comment:8 Changed 5 years ago by Jakub Ś

Resolution: duplicate
Status: confirmedclosed

@stuartlawder thank you for clarification. This issue is not about ACF in fact.

Your ticket is in fact a duplicate of #8369. This is an old bug that can be handled with ACF but it occurs when ACF is disabled (gone like in older CKE versions).

On one hand you styles can be handled with ACF but on the other oEmbed needs allowedContent:true. IMHO in this case first of all it is oEmbed that should be adjusted to ACF. Second, we should fix this old issue.

Closing this one as duplicate.

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy