Wednesday, May 2, 2007

Sterilizing For Pregnant Dogs

RTE (HTMLArea): paragraph and text selection define

So, after a long time writing another entry ...
I have once again engaged in a Typo3 problem and found a solution ;-).
Problem: Customer wants to highlight the RTE text and make it turn red. The just use the Color Picker, but her knows that: Once you give the general editor, more options than necessary, everyone must obviously be a mess out somehow somewhere in the website. As a developer, you get gray hairs over relatively quickly, as it probably even six months gehießen even before "The page must correspond exactly to our Style Guide!" has and it is for the A * sch has opened ... well, for the solution ...
TSConfig In your Page must be in the pure:
 
RTE.config.tt_content.bodytext
proc.allowedClasses = {} redtext

RTE.default
{# just to be sure that all fields are #
da .. .
showButtons = *
}
RTE {
classes {
redtext {
name = Red
value = color: # AA0000;
}
important {
name = Important
value = color: # 00FF00;
}
} default
{
classesCharacter = = Redtext
classesParagraph important
contentCSS = fileadmin / _system / rte.css
}}


So now created her a CSS file with the abstract names rte.css.
In the states the following:
 
span.redtext
{color: # AA0000;}


p.important
{color: # 00FF00;}


Download the file in the directory files / _system (or wherever However - you must then just adjust the path above).
Flushes all caches have on the safety time and already you should select the part of the text in your text drop-down list, select \u0026lt;Rot> . Your clicks into a Paragraph, should see \u0026lt;Wichtig> .

The really was all in all, nothing heavy, but can still eat time.

0 comments:

Post a Comment