Opened 8 years ago

Closed 7 years ago

#14692 closed Bug (expired)

Remove format button doesn't remove styles copied from websites

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


We copied the text below from a website. The styles will not be removed if the 'remove format' button is clicked. Tested in OS X Firefox and Windows IE 9.

<h2><a href="" rel="nofollow">Rijksmonumenten in Nederland</a></h2>

<div> <div> <p>Nederland heeft bijna 62.000 rijksmonumenten. Dit zijn gebouwen of andere objecten die om hun nationale cultuurhistorische waarde door de overheid zijn aangewezen als beschermd monument.</p> </div>

<div> <ul>

<li><a href="" rel="nofollow">Monumentenregister</a></li> <li><a href="" rel="nofollow">Rijksmonumentenbord</a></li> <li><a href="" rel="nofollow">Instandhoudingssubsidie</a></li> <li><a href="" rel="nofollow">De RestauratieWijzer</a></li> <li><a href="" rel="nofollow">Restauratiefonds-hypotheek</a></li>

</ul> </div> </div>

<div> <div><a href="" rel="nofollow">Lees verder</a></div> </div>

Change History (4)

comment:1 Changed 8 years ago by Jakub Ś

Status: newpending
Version: 4.5.10 (GitHub - master)

I can see no styles in given sample code. What exactly doesn't this option remove? Are you talking about rel attribute on link?

NOTE: Please see!/api/CKEDITOR.config-cfg-removeFormatTags and!/api/CKEDITOR.config-cfg-removeFormatAttributes

comment:2 Changed 8 years ago by Nathan Vergunst

The expectation was that also the lists and the headers will be removed. Probably we are not completely clear on what the button actually does. Maybe it could be a feature request for the future.

comment:3 Changed 8 years ago by Jakub Ś

The expectation was that also the lists and the headers will be removed

The remove Format command works only with inline elements. Headers and Lists are block-level elements so Remove Format doesn't touch them.

Perhaps your ACF settings don't allow them. If you don't have list or headers defined in your editor (e.g. no list plugin, no format dropdown), you need to report them to ACF. Please read more about this filter here:!/guide/dev_acf!/guide/dev_advanced_content_filter!/guide/dev_disallowed_content!/api/CKEDITOR.filter-method-addTransformations!/api/CKEDITOR.config-cfg-allowedContent!/api/CKEDITOR.config-cfg-extraAllowedContent

If this is ACF then my guess is that extraAllowedContent needs extra settings e.g. config.extraAllowedContent = 'h1 h2 h3 h4 h5 ul ol li';

comment:4 Changed 7 years ago by Jakub Ś

Resolution: expired
Status: pendingclosed
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