Zum Inhalt springen

RTE, h1 klassen

Erstellt am 18. Juli 2005 · 2 Antworten · letzte Antwort am 19. Juli 2005

Tags: Frage

meconen ·

Servus Leute,

da ich jetzt den rtehtmlarea zum laufen bekommen habe, stellt sich mir ein neues Problem in den Weg.

Alle <hx> </hx> (1-5) werden mit einem <p></p> gewrappt. (<p><h1></h1></p>)

Ich habe es dies in meinem Setup eingefügt um keine Paragraphs in meinen Listen zu bekommen.

#rte bullet list conf with additional parsing of buletlists
tt_content.text.20.parseFunc {
externalBlocks = ol, ul, li
externalBlocks.ul.stdWrap.parseFunc < tt_content.text.20.parseFunc
externalBlocks.ul.stdWrap.parseFunc {
###this below bacuse sometimes fuction inherits externalBlock from above
#and do not parse anything
externalBlocks =
nonTypoTagStdWrap.encapsLines.encapsTagList = p, div, a,
nonTypoTagStdWrap.encapsLines.nonWrappedTag >
nonTypoTagStdWrap.encapsLines.wrapNonWrappedLines = |
}
externalBlocks.ol.stdWrap.parseFunc < externalBlocks.ul.stdWrap.parseFunc
externalBlocks.ol.stripNL = 1
externalBlocks.ul.stripNL = 1
nonTypoTagStdWrap.textStyle.altWrap =|
nonTypoTagStdWrap.encapsLines.encapsTagList = p, div, a
nonTypoTagStdWrap.encapsLines.nonWrappedTag >
nonTypoTagStdWrap.encapsLines.wrapNonWrappedLines = <p> | </p>
}

Hiermit wird jede Zeile im RTE mit einem <p> tag versehen. das ist auch gut so!
Aber er wrapt mir auch leider die <hx> Tags... wie kriege ich diese Wraps weg?

Noch was.
Ich moechte diese tags ändern.
<i> -> <em>
<b> -> <strong>

RTE.default.proc.entryHTMLparser_db = 1
RTE.default.proc.entryHTMLparser_db {

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

funktioniert leider nicht. Habe das ins TSConfig Root eingefügt.

Danke und Gruß
joe

meconen ·

Hallo Leute,

ich habs raus. Eigentlich dumm von mir selbst. Da ich dieses Script für die Listen beutzt habe, also das diese nicht gewrappt werden. Also kann ich auch dies für die Headlinse nehmen oder für jedes andere html Tag.

#rte bullet list conf with additional parsing of buletlists
tt_content.text.20.parseFunc {
externalBlocks = ol, ul, li
externalBlocks.ul.stdWrap.parseFunc < tt_content.text.20.parseFunc
externalBlocks.ul.stdWrap.parseFunc {
###this below bacuse sometimes fuction inherits externalBlock from above
#and do not parse anything
externalBlocks =
nonTypoTagStdWrap.encapsLines.encapsTagList = p, div, a,
nonTypoTagStdWrap.encapsLines.nonWrappedTag >
nonTypoTagStdWrap.encapsLines.wrapNonWrappedLines = |
}
externalBlocks.ol.stdWrap.parseFunc < externalBlocks.ul.stdWrap.parseFunc
externalBlocks.ol.stripNL = 1
externalBlocks.ul.stripNL = 1
nonTypoTagStdWrap.textStyle.altWrap =|
nonTypoTagStdWrap.encapsLines.encapsTagList = p, div, a
nonTypoTagStdWrap.encapsLines.nonWrappedTag >
nonTypoTagStdWrap.encapsLines.wrapNonWrappedLines = <p> | </p>
}

einfach hinzufügen
externalBlocks = ol, ul, li => externalBlocks = ol, ul, li, h2 etc...
---
externalBlocks.h2.stripNL = 1

Dann funktioniert es Tadellos.

Jetzt habe ich nur noch das Problem mit dem Remapen der Tags. b -> strong, i->em

Grüße
Joe Mec.

meconen ·

Hallo leute trotzdem Danke
Hab das Remapping porblem gelöst.

nun wird
b = strong
i = em

mit diesem Schnippsel ins TSCondig funktioniert es:

# RTEhtmlArea Remap von Tags #Vorsicht Bug der deppt löscht alle anderen Tags wenn sie nicht mit angegben sind

RTE.config.tt_content.bodytext.proc.exitHTMLparser_db = 1
RTE.config.tt_content.bodytext.proc.exitHTMLparser_db.tags {

b.remap = strong
i.remap = em
}