#104377RTE Classes got overwritten after every save & open RTE again
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.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
History 3
-
Garvin Hicking commented and changed status
NewNeeds Feedback 07/12/24, 19:45 -
Mohamed Masmoudi commented and changed done
0 %100 % 07/12/24, 20:59Garvin 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 thisThank you Garvin, this is exactly was the solution.
-
Garvin Hicking commented and changed status
Needs FeedbackClosed 07/12/24, 22:20Yay, that’s great :) Closing the issue then.
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