Zum Inhalt springen

b-Tags bei Datenbankeintrag als strong parsen funktioniert nicht

Erstellt am 15. September 2008 · 1 Antwort · letzte Antwort am 15. September 2008

Tags: TYPO3 4, Frage

tulkas ·

Hi,

ich versuche gerade meinem RTE (Versionen 1.7.4 bzw. 1.7.5 auf Typo3 4.2/4.2.1) beizubringen alle b-Tags durch strong zu ersetzen. Laut Karins HowTo müsste das ja mit dem Befehl

RTE.default.proc.entryHTMLparser_db.tags.b.remap = strong

funktionieren. Leider spricht der Befehl nicht an und die b-Tags bleiben im Quelltext stehen. Wenn ich versuche strong direkt in die HTML-Eingabe zu schreiben wird strong beim Speichern durch b ersetzt.

TSConfig-Auszug:

RTE.default {

[...]
       
        proc {
                # tags die erlaubt / verboten sind
                allowTags = 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

[...]    

                # html parser einstellungen
                HTMLparser_rte {

                        # tags die erlaubt/verboten sind
                        allowTags < RTE.default.proc.allowTags
                        denyTags < RTE.default.proc.denyTags

                        # tags die untersagt sind
                        removeTags = font

                        # entfernt html-kommentare
                        removeComments = 1

                        # tags die nicht übereinstimmen werden nicht entfernt (protect / 1 / 0)
                        keepNonMatchedTags = 0
                }


                # Content to database
                entryHTMLparser_db = 1
                entryHTMLparser_db {

                        # tags die erlaubt/verboten sind
                        allowTags < RTE.default.proc.allowTags
                        denyTags < RTE.default.proc.denyTags

                        # CLEAN TAGS
                        noAttrib = b, i, u, strike, sub, sup, strong, em, quote, blockquote, cite, tt, br, center

                        rmTagIfNoAttrib = span,div,font

                        # htmlSpecialChars = 1
       
                        ## align attribute werden erlaubt
                        tags {
                                p.fixAttrib.align.unset >
                                p.allowedAttribs = class,style,align

                                div.fixAttrib.align.unset >

                                hr.allowedAttribs = class

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

                                ## img tags werden erlaubt
                                img >
                        }
                }

        }

[...]
}
tulkas ·

Mittagspause machen hilft 🙂. Nach nem Spaziergang durch die Stadt hab ich nochmal in die offizielle Doku geguckt und da steht folgendes:

exitHTMLparser_db = 1
exitHTMLparser_db {

## REMAP B AND I TAGS
## b and i tags are used by Mozilla/Firefox in editing mode.
## This must be done on exit because the default HTMLparser_db parsing executes the reverse mapping.

tags.b.remap = strong
tags.i.remap = em

[...]
}

Das hab ich eingefügt und dann gings http://typo3.org/documentation/document-library/extension-manuals/rtehtmlarea/1.4.4/view/5/1/.