[TYPO3] Problem with class=bodytext in htmlArea RTE

Jeroen Visser jeroen at roquin.nl
Wed Sep 12 09:45:50 CEST 2007


Hello everyone,

I have a problem with styles in the RTE.

 

When I write this in the BE it looks as follow's:

            

<h1 class="h1">Lorem ipsum dolor sit amet. </h1>

<p class="contenttable">Morbi mattis, dui in gravida commodo, felis libero
interdum metus, et condimentum magna nibh ut sapien. Morbi neque erat,
nonummy a</p>

 

When I save this it does not save the class given to the pragraph but
instead it becomes just a <p>.

 

When I look in the FE source I see:

 

        <h1 class="h1">Lorem ipsum dolor sit amet. </h1>

        <p class="bodytext">Morbi mattis, du.

 

Does anyone has a idea howto fix this? When I say the class should be "a"
then I really want it to be "a" J 

My TS is as follow's:

 

 

//

//          Project:           

//          Version:          1.0.0

//          Date:

//          Auhor:             

// 

// Done with SweeTS - delicious TypoScript development. 

// http://typo3.area42.de

//

 

#RTE.default >

RTE.default {

 

contentCSS = fileadmin/styles/rte.css

useCSS = 0

 

# showTagFreeClasses = 1

# hideTags = font, font (full)

# classesParagraph = Hinweis, Gross

#mainStyleOverride = 1

#ignoreMainStyleOverride = 1

#classesParagraph =

#classesCharacter =

#disablePCexamples = 1

proc.entryHTMLparser_db.tags.img >

proc.allowTagsOutside := addToList(img)

 

proc.dontConvBRtoParagraph = 1

proc.preserveTables = 1

proc.typolist = 0

} 

 

 

 

#RTE.classes >

#RTE.default >

## Define labels and styles to be applied to class selectors in the
interface of the RTE

## The examples included here make partial re-use of color scheme and frame
scheme from CSS Styled Content extension

RTE.classes {

            align-left {

                        name =
LLL:EXT:rtehtmlarea/htmlarea/locallang_tooltips.xml:justifyleft

                        value = text-align: left;

            }

// en meer

}

 

            ## Anchor classes configuration for use by the anchor
accesibility feature (htmlArea RTE only)

RTE.classesAnchor {

            externalLink {

                        class = external-link

                        type = url

                        titleText =
LLL:EXT:rtehtmlarea/htmlarea/plugins/TYPO3Browsers/locallang.xml:external_li
nk_titleText

            }

// en meer

}

 

## Default RTE configuration

RTE.default {

showTagFreeClasses = 1

disablePCexamples = 1

            ## Markup options (htmlArea RTE only)

            enableWordClean = 1

            removeTrailingBR = 1

            removeComments = 1

            removeTags = center, font, o:p, sdfield, strike,u

            removeTagsAndContents = style,script

            

                        ## Toolbar options

                        ## The TCA configuration may add buttons to the
toolbar

                        ## The following buttons are specific to Classic
RTE: class

                        ## The following buttons are specific to htmlArea
RTE: blockstylelabel, blockstyle, textstylelabel, textstyle, 

                        ##                    insertcharacter, findreplace,
removeformat, toggleborders, tableproperties, 

                        ##                    rowproperties, rowinsertabove,
rowinsertunder, rowdelete, rowsplit, 

                        ##                    columninsertbefore,
columninsertafter, columndelete, columnsplit, 

                        ##                    cellproperties,
cellinsertbefore, cellinsertafter, celldelete, cellsplit, cellmerge

showButtons ( 

                        class, blockstylelabel, blockstyle, textstylelabel,
textstyle,

                        formatblock, bold, italic, subscript, superscript,

                        textindicator,

                        insertcharacter, link, table, findreplace, chMode,
removeformat, undo, redo, about,

                        toggleborders, tableproperties,

                        rowproperties, rowinsertabove, rowinsertunder,
rowdelete, rowsplit,

                        columninsertbefore, columninsertafter, columndelete,
columnsplit,

                        cellproperties, cellinsertbefore, cellinsertafter,
celldelete, cellsplit, cellmerge

            )

            

            ## More toolbar options (htmlArea RTE only)

            keepButtonGroupTogether = 1

            

            ## Enable status bar (htmlArea RTE only)

            showStatusBar =  1

            

            ## Hide infrequently used paragraph types in the paragraph type
selector (formatblock button)

            hidePStyleItems = pre,address

            

            ## Add default example styles

            ## The example styles included here make partial re-use of color
scheme and frame scheme from CSS Styled Content extension

            ## Left, center and right alignment of text in paragraphs and
cells.

            inlineStyle.text-alignment (

                        p.align-left, h1.align-left, h2.align-left,
h3.align-left, h4.align-left, h5.align-left, h6.align-left, td.align-left {
text-align: left; }

                        p.align-center, h1.align-center, h2.align-center,
h3.align-center, h4.align-center, h5.align-center, h6.align-center,
td.align-center { text-align: center; }

                        p.align-right, h1.align-right, h2.align-right,
h3.align-right, h4.align-right, h5.align-right, h6.align-right,
td.align-right { text-align: right; }

            )

            ## Two frame examples taken from the example CSS file of CSS
Styled Content extension and applied to p and table block elements.

            inlineStyle.frames (

                        p.csc-frame-frame1, table.csc-frame-frame1 {
background-color: #EDEBF1; padding: 2px 4px 2px 4px; border: 1px solid
#333333; }

                        p.csc-frame-frame2, table.csc-frame-frame2 {
background-color: #F5FFAA; padding: 2px 4px 2px 4px; border: 1px solid
#333333; }

                        p.csc-frame-frame3, table.csc-frame-frame3 {
background-color: #F5FFAA; padding: 2px 4px 2px 4px; border: 1px solid
#333333; }

            )

            ## Bullet styles for unordered lists.

            inlineStyle.ul (

                        ul.component-items { color: #186900;
list-style-type: circle; }

                        ul.action-items { color: #8A0020; list-style-image:
url(img/red_arrow_bullet.gif); }

            )

            ## Numbering styles for ordered lists.

            inlineStyle.ol (

                        ol.component-items-ordered { color: #10007B;
list-style-type: lower-roman; }

                        ol.action-items-ordered { color: #8A0020;
list-style-type: lower-greek; }

            )

            ## Three inline text colors taken from the color scheme of CSS
Styled Content extension.

            inlineStyle.inline-text (

                        span.important { color: #8A0020; }

                        span.name-of-person { color: #10007B; }

                        span.detail { color: #186900; }

            )

            

            ## Use stylesheet file rather than the above mainStyleOverride
and inlineStyle properties to style the contents (htmlArea RTE only)

            ignoreMainStyleOverride = 1

            

            ## List all class selectors that are allowed on the way to the
database

            proc.allowedClasses (

                        external-link, external-link-new-window,
internal-link, internal-link-new-window, download, mail,

                        align-left, align-center, align-right,

                        csc-frame-frame1, csc-frame-frame2,
csc-frame-frame3,

                        component-items, action-items,

                        component-items-ordered, action-items-ordered,

                        important, name-of-person, detail, zwartwit

            )

            

            ## classesParagraph, classesTable, classesTD, classesLinks,
classesCharacter

            ## Classic RTE: Specify the list of class selectors that should
be presented in the RTE interface:

            ## htmlArea RTE: Restrict the list of class selectors presented
by the RTE to the following:

            classesParagraph (

                        align-left, align-center, align-right, 

                        csc-frame-frame1, csc-frame-frame2,
csc-frame-frame3, zwartwit

            )

            classesTable = csc-frame-frame1, csc-frame-frame2,
csc-frame-frame3

            classesTD = align-left, align-center, align-right

            classesLinks = external-link, external-link-new-window,
internal-link, internal-link-new-window, download, mail

            classesCharacter = important, name-of-person, detail

            

            ## Configuration of the anchor accessibility feature (htmlArea
RTE only)

            ## These classes should also be in the list of allowedClasses.

            classesAnchor = external-link, external-link-new-window,
internal-link, internal-link-new-window, download, mail

            classesAnchor.default {

                        page = internal-link

                        url = external-link-new-window

                        file = download

                        mail = mail

            }

            

            ## Configuration specific to the TableOperations feature
(htmlArea RTE only)

            ## Remove the following fieldsets from the table operations
dialogs

            disableAlignmentFieldsetInTableOperations = 1

            disableSpacingFieldsetInTableOperations = 1

            disableColorFieldsetInTableOperations = 1

            disableLayoutFieldsetInTableOperations = 1

            disableBordersFieldsetInTableOperations = 1

}

 

## front end RTE configuration for the general public (htmlArea RTE only)

RTE.default.FE < RTE.default

RTE.default.FE.showStatusBar = 0

RTE.default.FE.hideButtons = chMode, blockstyle, textstyle, underline,
strikethrough, subscript, superscript, lefttoright, righttoleft, left,
center, right, justifyfull, table, inserttag, findreplace, removeformat,
copy, cut, paste

RTE.default.FE.FE >

RTE.default.FE.userElements >

RTE.default.FE.userLinks >

 

## tt_content TCEFORM configuration

## Let use all the space available for more comfort.

TCEFORM.tt_content.bodytext.RTEfullScreenWidth= 100%

 

 

RTE.default {

 

                ## Enable the image button

            showButtons := addToList(image)

 

                ## Tags allowed outside p & div

                ## Adding img tag to the default list

            proc.allowTagsOutside := addToList(img)

 

            ## Do not remove img tags

            proc.entryHTMLparser_db.tags.img >

        

showButtons := addToList(image)

showButtons := addToList(TableOperations)

showButtons := addToList(cut)

showButtons := addToList(copy)

showButtons := addToList(paste)

}

 

RTE.default.FE.showButtons < RTE.default.showButtons

RTE.default.FE.proc.allowTagsOutside < RTE.default.proc.allowTagsOutside

RTE.default.FE.proc.entryHTMLparser_db.tags.img >

 

 

RTE.config.tt_news.bodytext < RTE.default

 

# entfernt die class="bodytext"-Attribute aus den <p>-Tags ###

#lib.parseFunc_RTE.nonTypoTagStdWrap.encapsLines.addAttributes.P.class >

#lib.parseFunc_RTE.externalBlocks.table.stdWrap.HTMLparser.tags.table.fixAtt
rib.class.list >

 

 

Thank's in advance.

 

Jeroen Visser

 

 



More information about the TYPO3-english mailing list