Opened 3 years ago

Closed 3 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:

Description

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="https://www.monumenten.nl/soorten-monumenten/rijksmonument" 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="http://www.monumentenregister.nl/" rel="nofollow">Monumentenregister</a></li> <li><a href="http://www.anwb.nl/themas/monumentenborden/monumentenbord" rel="nofollow">Rijksmonumentenbord</a></li> <li><a href="https://www.monumenten.nl/onderhoud-en-restauratie/instandhoudingssubsidie" rel="nofollow">Instandhoudingssubsidie</a></li> <li><a href="https://www.monumenten.nl/onderhoud-en-restauratie/financiering-onderhoud-en-restauratie/restauratiewijzer" rel="nofollow">De RestauratieWijzer</a></li> <li><a href="https://www.monumenten.nl/onderhoud-en-restauratie/financiering-onderhoud-en-restauratie/restauratiefonds-hypotheek" rel="nofollow">Restauratiefonds-hypotheek</a></li>

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

<div> <div><a href="https://www.monumenten.nl/soorten-monumenten/rijksmonument" rel="nofollow">Lees verder</a></div> </div>

Change History (4)

comment:1 Changed 3 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 http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-removeFormatTags and http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-removeFormatAttributes

comment:2 Changed 3 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 3 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:
http://docs.ckeditor.com/#!/guide/dev_acf
http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter
http://docs.ckeditor.com/#!/guide/dev_disallowed_content
http://docs.ckeditor.com/#!/api/CKEDITOR.filter-method-addTransformations
http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-allowedContent
http://docs.ckeditor.com/#!/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 3 years ago by Jakub Ś

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