[Typo3] htmlarea doesn't save span tags correctly - transformation problem?

Carla Froitzheim cf at cf-webservice.de
Thu Jun 30 12:13:17 CEST 2005


>
> ok, if i change that, i can't select in the textstyle box. Do you mean
> the blockstyle dropdown menu? but there I have the problem, that I can't
> get rid of those standard classes like h1,h2 and so on...

If you haven´t suppressed them in your TS Config you should have:

- A drop-down box with "Normal" "Heading1" etc. This is for headers (and
PRE) only.
- A drop-down box called "Paragraph" (or "Absatz" in German). This for p
styles, ul styles, li styles etc., all block tags in your html.
- A drop-down box called "Text". This is for span styles (=inline tag).

If you define p.myclass in your rte css, it shows up in the drop-down
Paragraph.
If you define span.myclass in your rte css, it shows up in the drop-down
Text.

>
> Just another question: Could you perhaps post a working example of
> TSConfig code? just for me to see how it realy works..
>
This is one possible configuration. But please note I have suppressed some
options to stop editors beeing too creative in using styles.

RTE.default.contentCSS = fileadmin/templates/main/css/rte.css

RTE.default.enableWordClean = 1
RTE.default.disableEnterParagraphs = 0
RTE.default.useCSS = 1


RTE.default.hideButtons = fontstyle, fontsize, lefttoright, righttoleft,
inserttag
RTE.default.hidePStyleItems = PRE, H1
RTE.default.hideTags = font, font (full)

RTE.default.showTagFreeClasses = 0
RTE.default.classesCharacter = quote, deprecated
RTE.default.classesImage =
RTE.default.classesAnchor =

RTE.default.showStatusBar = 1

#must be set for span classes !!!
RTE.config.tt_content.bodytext.proc.allowedClasses = quote, deprecated

RTE.default.proc {
    // TRANSFORMATION METHOD
    overruleMode = ts_css

    // LINES CONVERSION
    dontConvBRtoParagraph = 1

    // TAGS ALLOWED OUTSIDE P & DIV
    allowTagsOutside = img,hr

    // TAGS ALLOWED
    allowTags = table, tbody, tr, th, td, h1, h2, h3, h4, h5, h6, div, p,
br, span, ul, ol, li, pre, blockquote, strong, em, b, i, u, sub, sup,
strike, a, img, nobr, hr, tt, q, cite, abbr, acronym

    // ALLOWED P & DIV ATTRIBUTES
    keepPDIVattribs = align,class,style

    // CONTENT TO RTE
    HTMLparser_rte {
        // TAGS ALLOWED
        allowTags < RTE.default.proc.allowTags

        // DO NOT REMOVE UNMATCHED TAGS
        keepNonMatchedTags = 0

    }

    // CONTENT TO DATABASE


       entryHTMLparser_db = 1
       entryHTMLparser_db {

        // XHTML COMPLIANCE
        xhtml_cleaning = 1

        // CLEAN TAGS

        noAttrib = b, i, u, strike, sub, sup, strong, em, quote,
blockquote, cite, tt, br, center
        tags.font.allowedAttribs = color, style
        tags.hr.allowedAttribs = class
        // REMAP B AND I TAGS
        tags.b.remap = strong
        tags.i.remap = em

        rmTagIfNoAttrib = span,div,font

        #htmlSpecialChars = 1
   }

RTE.default.disableColorPicker = 1
RTE.default.disableSelectColor = 0

RTE.colors {

   color1 {
      name = dunkelblau
      value = #000066
   }

    color2 {
       name = blau
       value = #00008B
   }
   color3 {
       name = rotbraun
       value = #B22222
   }
   color4 {
       name = dunkelrot
       value = #CC3300
   }
   color5 {
       name = mittelbraun
       value = #D2691E
   }
   color6 {
       name = orange
       value = #FF9933
   }
   color7 {
       name = pfirsich
       value = #FFDAB9
   }
   color8 {
       name = natur
       value = #FDF5E6
   }

}
RTE.default.colors = color1, color2, color3, color4, color5, color6,
color7, color8


------
Carla




More information about the TYPO3-english mailing list