[TYPO3-english] Can't nest <strong> and <u> on rtehtmlarea

Sergio naguib.mahfuz at gmail.com
Mon Aug 16 17:57:41 CEST 2010


Hi,

as it is said on the subject, i can't nest <strong> and <u> tags when saving
on rtehtmlarea. I can't figure it out what it is :(

Can you help me with my configuration? This is my Page TSConfig for RTE:

---

RTE.default {

        contentCSS = fileadmin/templates/css/rte.css

        # clear typical styling
        classesAnchor >

        ## classesLinks := addToList()

        # set classes available to these properties. Paragraph is another
name
        # for block
        #classesCharacter := addToList()
        classesParagraph := addToList(left, center, right, justify)
    #classesTable := addToList()
        #classesTD := addToList()

        # list all available classes here, otherwise they're removed on RTE
save
        proc.allowedClasses := addToList(left, center, right, justify)

        ## Markup options
        enableWordClean = 1
        removeTrailingBR = 1
        removeComments = 1
        #removeTags = center, sdfield
        removeTagsAndContents = style,script

    #############################
    ### SHOW AND HIDE BUTTONS ###
    #############################

        showButtons := addToList(strong, emphasis, underline, strikethrough,
superscript, outdent, indent, fontsize, left, center, right, justifyfull,
textcolor, bgcolor, image, removeformat)
        hideButtons = bold, italic, formatblock, fontstyle, textstylelabel,
textstyle, showhelp, about, subscript, fontstyle, textindicator, emoticon,
user, spellcheck, acronym, toggleborders, tableproperties, tablerestyle,
rowproperties, rowinsertabove, rowinsertunder, rowdelete, rowsplit,
columnproperties, columninsertbefore, columninsertafter, columndelete,
columnsplit, cellproperties, cellinsertbefore, cellinsertafter, celldelete,
cellsplit, cellmerge

    #############################
    #############################

    buttons.image.options.magic.maxWidth = 738
    buttons.image.options.magic.maxHeight = 640
    buttons.image.options.plain.maxWidth = 738
    buttons.image.options.plain.maxHeight = 640

    buttons.left.useAlignAttribute = 1
    buttons.center.useAlignAttribute = 1
    buttons.right.useAlignAttribute = 1
    buttons.justifyfull.useAlignAttribute = 1

    buttons.textstyle.tags.span.allowedClasses := addToList()

        keepButtonGroupTogether = 1
        showStatusBar =  1

        ## Add styles 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; }
        )

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

        proc {
                allowTags = div,small,table, tbody, tr, th, td, h1, h2, h3,
h4, h5, h6, div, p, br, span, ul, ol, li, re, blockquote, strong, em, b, i,
u, sub, sup, strike, a, img, nobr, hr, tt, q, cite, abbr, acronym, center
                denyTags = font
                dontConvBRtoParagraph = 1
                allowTagsOutside = img,hr,small,strong,u
                keepPDIVattribs = align,class,style,id

                # List all class selectors that are allowed on the way to
the database
                allowedClasses (
                        external-link, external-link-new-window,
internal-link, internal-link-new-window, download, mail,
                        align-left, align-center, align-right, align-justify
                )

                # html parser einstellungen
                HTMLparser_rte {
             htmlSpecialChars = 0
                        allowTags < RTE.default.proc.allowTags
                        denyTags < RTE.default.proc.denyTags
            removeTags = font
            removeComments = 1
                        keepNonMatchedTags = 1
                        tags.small.protect = 1
            table.fixAttrib.cellspacing.set = "0"
                }

         HTMLparser_db.xhtml_cleaning = 1

                # Content to database

                entryHTMLparser_db = 1
                entryHTMLparser_db {
             htmlSpecialChars = -1
                        allowTags < RTE.default.proc.allowTags
                        denyTags < RTE.default.proc.denyTags

                        # CLEAN TAGS
                        noAttrib = b, i, strike, sub, sup, em, quote,
blockquote, cite, tt, br, center, small
                        rmTagIfNoAttrib = font

                        ## align attribute werden erlaubt
                        tags {
                span.allowedAttribs = class,style
                span.nesting = 1
                #span.fixAttrib.style.unset = 0
                                table.fixAttrib.cellspacing.set = "0"
                p.fixAttrib.align.unset >
                                p.allowedAttribs = class,style,align
                                div.fixAttrib.align.unset >
                                div.allowedAttribs = class,style,align
                                hr.allowedAttribs = class

                                # b und i tags werden ersetzt (em / strong)
                                b.remap = strong
                                i.remap = em

                                ## img tags werden erlaubt
                                img >
                        }
                }
        }

        # Classes: Ausrichtungtm
        classesParagraph (
                align-left, align-center, align-right, align-justify
        )

        showTagFreeClasses = 1

        # Do not allow insertion of the following tags
        hideTags = font

        # Tabellen Optionen in der RTE Toolbar
        hideTableOperationsInToolbar = 0
        keepToggleBordersInToolbar = 1

        # Tabellen Editierungs-Optionen (cellspacing/ cellpadding / border)
        disableSpacingFieldsetInTableOperations = 0
        disableAlignmentFieldsetInTableOperations=1
        disableColorFieldsetInTableOperations=1
        disableLayoutFieldsetInTableOperations=1
        disableBordersFieldsetInTableOperations=0

        exitHTMLparser_db = 1
        exitHTMLparser_db {
            ## KEEP ALL TAGS
            ## Unwanted tags were removed on entry.
            ## Without this rule, the parser will remove all tags!
Presumably, this rule will be more efficient than repeating the allowTags
rule
            keepNonMatchedTags = 1

            ### tags {

            ### }

            ## AVOID CONTENT BEING HSC'ed TWICE
            htmlSpecialChars = 0
  }
}

# Use same processing as on entry to database to clean content pasted into
the editor
RTE.default.enableWordClean.HTMLparser < RTE.default.proc.entryHTMLparser_db

# FE RTE configuration (htmlArea RTE only)
RTE.default.FE < RTE.default
RTE.default.FE.userElements >
RTE.default.FE.userLinks >



---

Thanks in advance,
Sergio


More information about the TYPO3-english mailing list