[TYPO3] htmlarea add class in table

Patrick Rodacker patrick.rodacker at the-reflection.de
Wed May 23 14:17:28 CEST 2007


Hi Stano,

Stano Paška wrote on 23.05.2007 09:39:

> := addToList construction adds string at the end of existing list. I
> found it somewhere.

right you are ... its in the TSRef. Havn't used it myself yet, so I
missed that one ;-)


>> > RTE.default {
>> >  classesTable := addToList(cennik)
>> >  proc.allowedClasses := addToList(cennik)
>> > }

You have to specifiy the css class either in the 'inlineStyle' object or
in an external stylesheet overriding the default classes by 'contentCSS'.

If you use the 'inlineStyle' you have to set 'ignoreMainStyleOverride=0'
as well. Try this:

RTE.default {
	classesTable := addToList(cennik)
	proc.allowedClasses := addToList(cennik)
	inlineStyle.tables := addToList(table.cennik {
background-color:#EDEBF1; border: 1px solid #333333; } )
	ignoreMainStyleOverride = 0
}


If you want to use an external stylesheet the following code is sufficient:

RTE.default {
	contentCSS = fileadmin/templates/css/rte_styles.css
	classesTable := addToList(cennik)
	proc.allowedClasses := addToList(cennik)
}

The rte_styles.css would look like this:

table.cennik {
	background-color: #EDEBF1; border: 1px solid #333333;
}

HTH
Patrick


More information about the TYPO3-english mailing list