Bug #82476

CKEditor removes classes from p and span since TYPO3 8.7.5

Added by Michi Spandl almost 2 years ago. Updated 10 months ago.

Status:
New
Priority:
Must have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2017-09-13
Due date:
% Done:

0%

TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Since I have updatet to TYPO3 8.7.6 the CKEditor removes all classes from p and span Tags on saving in the Backend.
It's still possible to have classes in a-Tags and Headlines (h2,h3,...). If I downgrade to 8.7.4 it is working again!
Is someone experiencing the same issue?

History

#1 Updated by Grégory Duchesnes almost 2 years ago

have a look at #82374

#2 Updated by Florian Wessels almost 2 years ago

  • Subject changed from CKEditor removes classes from p and span since TYPO3 8.7.6 to CKEditor removes classes from p and span since TYPO3 8.7.5

I can confirm that issue.
Not working in 8.7.5, too.
Downgrade works fine...

#3 Updated by Michi Spandl almost 2 years ago

Still not working for me in 8.7.7 - but Grégory Duchesnes is right in #82374, an obsolete RTE.default.proc.allowedClasses := addToList(class-abc,class-xyz) solves the problem!

#4 Updated by Frederik Holz over 1 year ago

Confirm that this is still an issue on 8.7.8

Running RTE with a yaml config, without any other RTE typoscript (except RTE.default.preset) does not save any classes on p - Tags
Using RTE.default.proc.allowedClasses := addToList(class-abc,class-xyz) resolves the problem

#5 Updated by Jürg Blaser over 1 year ago

Frederik Holz wrote:

Confirm that this is still an issue on 8.7.8

Running RTE with a yaml config, without any other RTE typoscript (except RTE.default.preset) does not save any classes on p - Tags
Using RTE.default.proc.allowedClasses := addToList(class-abc,class-xyz) resolves the problem

Confirm that this is still an issue on 8.7.11
DELETE all RTE ... allowedClasses (on page-TSconfig) resolves the problem

#6 Updated by Andrea Moroni about 1 year ago

Still in Issue in TYPO3 8.7.13 :-(

#7 Updated by Markus Dübbert about 1 year ago

CK Editor again looses span and p classes in TYPO3 8.7.16
I'm not completely sure, but i think in 8.7.15 it worked.

#8 Updated by Riccardo De Contardi 10 months ago

I've performed the following tests using TYPO3 8.7.19 (fresh installation)

- I am using standard CKEditor configuration
- Info > page TSConfig shows as configuration just

RTE
   [default]
      [preset] = default

Test 1

I've created a text element and write in it (using the source code)

<p class="test test2">TEST TEST TEST TEST <span class="test3 test4">TEST TEST</span></p>

RESULTS: the p tag and its classes are kept, but the span tag has been stripped.

Test 2

Modified the CKEditor configuration in this way:

editor:
  config: 
    extraAllowedContent: "span"  

RESULTS: span tag is still absent, also p classes are stripped away, too.

Test 3

The only configuration that seems to work is:

editor:
  config: 
    extraAllowedContent: "p(*);span(*)" 

This will allow the span tag to be kept, and preserves any class attribute on both p and span

Also available in: Atom PDF