Bug #104377
closedRTE Classes got overwritten after every save & open RTE again
100%
Description
I have a TYPO3 v12 Installation, i have added some custom style definitions to the RTE:
style:
definitions:
- { name: "Headline P", element: "p", classes: [ 'headline' ] }
- { name: "Headline H1", element: "h1", classes: [ 'headline' ] }
- { name: "Headline H2", element: "h2", classes: [ 'headline' ] }
- { name: "Headline H3", element: "h3", classes: [ 'headline' ] }
- { name: "Subheadline P", element: "p", classes: [ 'headline headline--sub' ] }
- { name: "Subheadline H1", element: "h1", classes: [ 'headline headline--sub' ] }
- { name: "Subheadline H2", element: "h2", classes: [ 'headline headline--sub' ] }
- { name: "Subheadline H3", element: "h3", classes: [ 'headline headline--sub' ] }
After i modify the Text content element, for example if i have some text with a class 'headline headline--sub' after save and open again in RTE, this class is getting back to 'headline' class again. This Mean that every time i open the Text content element i have to redo every style [ 'headline headline--sub' ] before i save it again.
Updated by Garvin Hicking 7 months ago
ยท Edited
- Status changed from New to Needs Feedback
Have you tried if
classes: [ 'headline', 'headline--sub' ]
works? I believe only single classes are allowed as array values, but the ckeditor docs seem vague about this
Updated by Mohamed Masmoudi 7 months ago
- % Done changed from 0 to 100
Garvin Hicking wrote in #note-1:
Have you tried if
classes: [ 'headline', 'headline--sub' ]
works? I believe only single classes are allowed as array values, but the ckeditor docs seem vague about this
Thank you Garvin, this is exactly was the solution.
Updated by Garvin Hicking 7 months ago
- Status changed from Needs Feedback to Closed
Yay, that's great :) Closing the issue then.