Bug #82476
closedCKEditor removes classes from p and span since TYPO3 8.7.5
Added by Michi Spandl about 7 years ago. Updated 11 months ago.
0%
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?
Updated by Florian Wessels about 7 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...
Updated by Michi Spandl about 7 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!
Updated by Frederik Holz about 7 years 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
Updated by Jürg Blaser over 6 years 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
Updated by Markus Dübbert over 6 years 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.
Updated by Riccardo De Contardi about 6 years 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
Updated by Markus Dübbert over 4 years ago
- TYPO3 Version changed from 8 to 9
For me in TYPO3 9 this is still the solution:
RTE.default.proc.allowedClasses := addToList(class-abc,class-xyz)
Only needed for p or span classes.
Updated by David Voigt over 4 years ago
Still loses span and p classes with a default config in 8.7.32.
Justify classes are even included in the Default.yaml that is being shipped with the ext.
Edit: in my case, the problem was a legacy parseFunc_RTE directive that messed with p classes. Remember when all p were classed with class="bodytext"?
# remove class 'bodytext' from RTE-p-tags
lib.parseFunc_RTE.nonTypoTagStdWrap.encapsLines.addAttributes.P.class =
Updated by Benni Mack almost 3 years ago
- Status changed from New to Needs Feedback
Hey everyone,
just by reading, I think we have all the solutions by providing proper configuration to support this? Or would we need to change something in TYPO3 v10+?
Updated by Christian Kuhn 11 months ago
- Status changed from Needs Feedback to Closed
Hey. I hope it's ok to close here. Mainly due to lack of further feedback and with keeping in mind that v12 comes with a new ckeditor version that may have changed this area as well. Let's re-open a fresh issue referencing this one in case this is still an issue.