I want to allow my own CSS class into RTE (Rich Text Editor) in Typo3 backend. Please describe it me step by step.
I don't know how to add CSS class in RTE which is created by us in default.yaml . Please teach me specifically.
I want to allow my own CSS class into RTE (Rich Text Editor) in Typo3 backend. Please describe it me step by step.
I don't know how to add CSS class in RTE which is created by us in default.yaml . Please teach me specifically.
Copyright © 2021 Jogjafile Inc.
Let's assume we want to add the class
buttonto our<a>element.First things first we will need to define a new preset for our RTE as follows:
After we have defined the custom RTE preset we can go ahead and add our
buttonclass. To do that simply extend the preset with the following code:Here we simply define a new style with the name Button that we can apply to all elements of the type . This then gives that element the class button.
Put together the custom RTE preset, custom.yaml, would look something like this:
In our RTE we will now be able to pick our Button style from the styles dropdown as soon as we highlight a link element.