1
votes

I need a custom styling for different elements (ul li, ol li, tables, links etc.) that are added through Typo3 RTE.

Thus I want to configure the RTE so every time some content is added through RTE it is outputted in the front-end with a wrapping div e.g. <div class="added_through_rte"></div>.

Is there a way to do it?

1

1 Answers

2
votes

Put this in yout TypoScript setup

tt_content.text.20.wrap = <div class="added_through_rte"> | </div>

This wraps all content from the field "text" of the table tt_content.

If you use RTE in other records, you will have to configure each one in a simmilar way.

On the other hand, you can define custom CSS classes for the most elements (ul, ol, links, headers, paragraphs etc.) managed by a RTE. This is a lot more configure work but more flexibel, so you can have many different list classes to chose from etc. This is quite a huge topic and lot to research.