[TYPO3-dev] Side note on css_styled_content and RTEHTMLarea

Stanislas Rolland stanislas.rolland at fructifor.ca
Sat Apr 1 21:08:32 CEST 2006


Hi Susanne,
> 
> When using the RTE together with CSS Styl. Cont. in TYPO3 4.0 RC2 there 
> is something strange: RTE wraps everything with p-Tags, that's no 
> problem, but every style applied from css_styled_content works only for 
> div-Tags by default. So I just wanted to ask: was it meant to make 
> RTEHtmlArea not working with CSS_Styled_Content by default, or am I 
> missing something?
> 
> Example:
> RTE Output: <p class="csc-frame-frame1">some Text</p>
> CSS default styles: DIV.csc-frame-frame1 { background-color: #EDEBF1; 
> padding: 2px 4px 2px 4px; border: 1px solid #333333; }
> 
This specific selector of css_styled_content is meant to be applied to
the div tag corresponding to the "frame" property of the content element.

The RTE deals only with the "text" part of the content element. It does
not add any class attribute to the paragraph tag unless you add it
yourself. You do this with the Paragraph style dropdown list. However,
this dropdown list needs to be configured with whatever css selectors
you are using on your site.

As this configuration work is perhaps not so obvious, examples are
included with the extension. Such an example is the selector you are
referring to. It is defined in the example css file provided as default
so that something works when you install the RTE. Perhaps it was
ill-advised to reuse the same class name?

Note that the css files provided by css_styled_content are also only
examples. However, the example css file provided by rtehtmlarea is not
automatically included in the frontend (because installing a RTE should 
have no impact on frontend rendering). In this sense, you may be right
in noting that the examples are not well coordinated. On the other hand,
there is no assurance that both extensions would be simultaneously
installed.

Regards,
Stanislas





More information about the TYPO3-dev mailing list