[Typo3] RTE & Classes

Peter Niederlag niederlag at ikd01.de
Thu Feb 3 09:11:04 CET 2005


Hi,

Michael Cannon schrieb:
> Peter,
> 
> I can get the CSS classes to show in the RTE and even apply then to  
> selected content in the RTE. 

So they stay in there after you safe the element? It's very important to 
find out where your classes are lost before trying to "fix" it!
Are they lost when saving? (so actually they never get saved in the DB)

>However the class attributes seem to  
> disappear when it shows on the front-end. I needed forms to come  
> through the RTE; hence the form and its tags added to allowTags.

so the form tag is saved in RTE and DB and shows up in the FE?
the class is saved in RTE and DB, but doesn't show up int the FE?

In that case you most likely need to have a look at TS lib.parseFunc_RTE 
and fiddle with the HTMLparser setup.

> Any ideas to simplify and improve the following so that things work a  
> little more smoothly?

I haven't found an easy approach to that yet. It seems quite painful to 
get all that transformations as intended also imho it needs some decent 
knowledge/understanding about Typoscript and (RTE-)TSConfig in order to 
set them up.

> One bonus would be a complete removal of font tags. Rather than  
> changing <font...> into &lt;font..&gt;. How to do this?

see below...

> Thanks,
> 
> Michael

[...]
> In root page TSconfig
> 
> mod.SHARED.colPos_list = 0,1,2
> RTE.default {
>   contentCSS = fileadmin/bpminstitute.org/styles.css
>   proc {
>     remapParagraphTag = 0

add 'denyTags=font' here.

You might also need to apply it to 
RTE.config.tt_content.bodytext.proc.entryHTMLparser_db.removeTags = font.

[...]
> Setup
> 
> plugin.tx_indexedsearch._CSS_DEFAULT_STYLE >
> plugin.tx_newloginbox_pi3._CSS_DEFAULT_STYLE >
> plugin.tt_news._CSS_DEFAULT_STYLE >
> plugin.tx_quickpoll._CSS_DEFAULT_STYLE >
> plugin.tx_quickpoll_pi1._CSS_DEFAULT_STYLE >
> plugin.tx_srfeuserregister_pi1._CSS_DEFAULT_STYLE >
> 
> lib.parseFunc_RTE.nonTypoTagStdWrap.encapsLines {
>   encapsTagList = div,p,pre,h1,h2,h3,h4,h5,h6,dl,form
>   addAttributes.P.class >
>   nonWrappedTag = p
>   wrapNonWrappedLines =
> }

for your classes issue you might need to take a deeper look into 
lib.parseFunc_RTE. don't knwo never used classes on <form>

HtH,
Peter

P.S.:
I am currently working again on a nice RTE-setup, took me a while again 
to get <font> removed. I think can make a little screeny with the setup 
when I am through with it.
-- 
Peter Niederlag
http://www.niekom.de * TYPO3 & EDV Dienstleistungen *
http://www.typo3partner.net * professional services network *



More information about the TYPO3-english mailing list