[TYPO3] Span class removed by rtehtmlarea when saving

Pierre-Luc Drouin pldrouin at cyberfingers.net
Mon Jan 9 02:27:39 CET 2006


Hi,

I have configured RTE to use my custom css stylesheet, using the 
following lines in Page TS:
RTE.default.contentCSS = fileadmin/css/customstyles.css
RTE.default.useCSS = 1
RTE.default.showTagFreeClasses = 1

In my stylesheet, I have defined some span classes as this one:
span.new {
       color:#FF0000;
       font-weight:bold;
       text-decoration:blink;
}

When I create a new text element with RTEhtmlarea, I can apply the class 
to some text. For example, by selecting "new", I can get the following 
HTML code:
<p>This is a <span class="new">new</span> test.</p>

However, when I save this text, RTE deletes the span tag. If instead I 
have the following HTML code before saving:
<p>This is a <span style="font-style: italic;" class="new">new</span> 
test.</p>

RTE transforms the HTML code into the following after saving (it removes 
the class attribute):
<p>This is a <span style="font-style: italic;">new</span> test.</p>

If instead I put the text in a list, i.e.:
<ul><li>This is a <span class="new">new</span> test.</li></ul>

RTE does not modify the code when I save it.

What is causing this and how can I fix it?

Thanks a lot!

Pierre-Luc Drouin



More information about the TYPO3-english mailing list