[TYPO3-rte] RTE CSS Customization

Radu Mogos supergogs2001 at yahoo.com
Fri Nov 23 19:40:26 CET 2012


Hello

I'm having some issues with customising the classes shown in the RTE in the BE.
I've linked to a CSS file where I have defined all the classes/styles, they show up in the list of
available classes but the selection does not work for <table> and <td> tags.
It works for <th> though and for the others, <p>, <ul>, <div> etc

If I manually write the table or td class in the source code of the content and then save it, the class is saved
and shown in the FE. So it's only the BE selector/dropdown which does not set my class.

Here's my PAGE TSConfig code:
------

RTE.default {
 contentCSS = fileadmin/templates/rte/hotels.css
 classesTable = horizontal-minimalist-a, contenttable
 classesTD = td_style_1
 proc.allowedClasses := addToList(horizontal-minimalist-a, contenttable, td_style_1)
}

RTE.classes.horizontal-minimalist-a.name = Horizontal Table
RTE.classes.contenttable.name = Default Table
-----

CSS file content concerning the tables:
----
td.td_style_1 { color: red }
th.th_style_1 { color: green }

table.contenttable { width: 100%}
table.contenttable th {
  border-bottom: 1px solid lightgray;
  border-left: 10px solid #FFFFFF;
  border-right: 10px solid #FFFFFF;
  font-weight: bold;
  padding: 8px 2px;
}

table.horizontal-minimalist-a {
  background: none repeat scroll 0 0 #FFFFFF;
  border-collapse: collapse;
 
 font-size: 1em;
  margin: 20px;
  text-align: left;
  width: 100%;
}

table.horizontal-minimalist-a th {
  border-bottom: 2px solid #6678B1;
  color: #003399;
  font-size: 1.1em;
  font-weight: normal;
  padding: 10px 8px;
}

table.horizontal-minimalist-a td {
  color: #666699;
  padding: 9px 8px 0;
}
----

This is really annoying and frustrating.
There's so many doc on the web which is still not up to date.

Is there anyone out there that has a working up-to-date configuration that they can just simply
copy-paste so we can finally see how this should be done?

Thanks,
  Radu


More information about the TYPO3-project-rte mailing list