Also, ich versuche mich ja wirklich mit dem RTE anzufreunden! Dies scheint aber nicht auf Gegenseitigkeit zu beruhen! #evil#
Ich habe wieder viel getestet und dachte auch wieder, dass ich eine Lösung gefunden hätte, nämlich innerhalb von <div> nicht mehr mit <p>-Tags zu arbeiten, sondern diese durch <div> zu ersetzen.
Schien auch soweit zu funktionieren, aber die Vergangenheit hat ja gezeigt, nicht zu früh zu jubeln, wie auch diesmal.
Arbeite ich so, geht es:
<div class="drei-bilder-container">
<div class="drei-bilder">
<img src="http://dummy-bild.gif" width="150" />
Lorem ipsum dolor ...
</div>
</div>
Kommt aber z.B. eine Überschrift hinzu
<div class="drei-bilder-container">
<div class="drei-bilder">
<img src="http://dummy-bild.gif" width="150" />
<h1>testen</h1>Lorem...
</div>
</div>
<p><div class="drei-bilder-container">
<div class="drei-bilder">
<img src="http://dummy-bild.gif" alt="" width="150" />
</p>
<h1>testen</h1>
<p> Lorem ipsum ...</div>
</p>
</div>
</div>
Ich habe auch versucht, innerhalb der Klasse t3lib_parsehtml_proc.php, wie in unterem Post beschrieben, mal das Div dazu zu schreiben, aber ohne Ergebnis.
http://lists.netfielders.de/pipermail/typo3-german/2008-July/049184.html
Ich meine auch noch in einem Post gelesen zu haben, dass die <p> nun wieder eingefügt werden, da Typo3 die Verschachtelung nicht erkennt und diese deshalb als Absätze werten würde?!
Mir gehen so langsam wirklich die Ideen aus und ich habe keine Ahnung, wonach ich noch suchen soll.
Mir würde es jetzt fast schon reichen, wenn ich dem RTE, für diesen speziellen Fall einfach sagen könnte, dass die Inhalte ohne Filterung in die DB rein kommen. Dazu habe ich aber auch nichts gefunden.
Ich poste nochmal zusätzlich meine TSconfig und TS-Setup Einstellungen. Vielleicht fällt ja jemandem was auf, was ich übersehen habe.
Vielen Dank
## RTE Konfiguration
RTE.default {
# Frontend-Editierung aktivieren
useFEediting = 1
## Markup options
enableWordClean = 1
removeTrailingBR = 1
removeComments = 1
removeTags = center, sdfield
removeTagsAndContents = style,script
proc {
# DIV-Tags als DIV belassen und nicht in P umwandeln
remapParagraphTag = div
# 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
# br wird nicht zu p konvertiert
dontConvBRtoParagraph = 1
# tags sind erlaubt außerhalt von p, div
allowTagsOutside = img,hr
# erlaubte attribute in p, div tags
keepPDIVattribs = align,class,style,id
# 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 = div,span,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 >
}
}
}
}
# Use same processing as on entry to database to clean content pasted into the editor
RTE.default.enableWordClean.HTMLparser < RTE.default.proc.entryHTMLparser_db
# Breite des RTE in Fullscreen-Ansicht
TCEFORM.tt_content.bodytext.RTEfullScreenWidth= 80%
TS-Setup
parseFunc_RTE {
#--- RTE Tuning
nonTypoTagStdWrap.encapsLines {
nonTypoTagStdWrap >
addAttributes.DIV.class >
remapTag.DIV = DIV
encapsTagList = div,p
addAttributes >
# Keine Klasse für Standardabsätze
addAttributes.P.class =
#addAttributes.P.class >
# Keine Umwandlung von Tags
remapTag >
encapsLines >
# HTML-Tags, die nicht mit einem zusätzlichen <p>wrap umgeben werden dürfen
# DO NOT WRAP THOSE TAGS WITH <p>
encapsTagList = br, cite, div, p, pre, hr, h1, h2, h3, h4, h5, h6, table
}
# COPY ALLOW TAGS FROM PAGETS (WITHOUT b, i, link) sometimes there is a probblem with multiline so just use one line
allowTags = script, a, abbr, acronym, address, blockquote, br, caption, cite, code, div, em, embed, h1, h2, h3, h4, h5, h6, hr, img, li, object, ol, p, param, pre, q, span, strong, sub, sup, table, tbody, td, th, tr, tt, ul
# table handling
table.stripNL = 1
table.stdWrap.HTMLparser = 1
table.callRecursive = 1
table.callRecursive.tagStdWrap.HTMLparser = 1
table.stdWrap.HTMLparser.keepNonMatchedTags = 1
# Do NOT add any unwanted p elements in table cells, and do NOT remove any p-elements that have been added by authors!
table.HTMLtableCells = 1
table.HTMLtableCells.default.stdWrap.parseFunc =< lib.parseFunc
externalBlocks = div
## make DIV an externalBlocks.tag and call parseFunc_RTE recursivly
#externalBlocks.div.callRecursive = 1
#externalBlocks.div.callRecursive = 0
# avoid unwanted p-elements in th/td on the way to FE
externalBlocks.table.HTMLtableCells.default >
externalBlocks.table.HTMLtableCells.default.stdWrap.parseFunc =< lib.parseFunc
# DO NOT ADD class="contenttable" TO EVERY TABLE => ALLOW COSTUM class
externalBlocks.table.stdWrap.HTMLparser.tags.table.fixAttrib.class >
# DO NOT AUTOLINK EVERY STRING THAT STARTS WITH HTTP OR MAILTO
# such strings in the content are assumed to be intentional
# makelinks >
# externalBlocks.ul.stdWrap.parseFunc.makelinks = 0
# externalBlocks.ol.stdWrap.parseFunc.makelinks = 0
}
# function to allow custom link attributes
parseFunc.tags.a = COA
parseFunc.tags.a {
// Parsing of A tag if not an anchor
10 = TEXT
10.current = 1
10.required = 1 // Remove empty links
10.typolink.parameter.data = parameters : allParams
10.typolink.parameter.postUserFunc = user_tinymce_rte->getHref
10.typolink.ATagParams.data = parameters : allParams
10.typolink.ATagParams.postUserFunc = user_tinymce_rte->getATagParams
10.if.isTrue.data = parameters : allParams
10.if.isTrue.postUserFunc = user_tinymce_rte->isNotAnchor
// Parsing of A tag if an anchor
20 = TEXT
20.current = 1
20.dataWrap = <a {parameters : allParams}>|</a>
20.if.isTrue.data = parameters : allParams
20.if.isTrue.postUserFunc = user_tinymce_rte->isNotAnchor
20.if.negate = 1
}
parseFunc_RTE.tags.a < lib.parseFunc.tags.a
// Remove empty links
parseFunc.tags.link.required = 1
parseFunc_RTE.tags.link.required = 1
# allow all values in the FE
parseFunc.denyTags =
parseFunc_RTE.denyTags =
}
########## BREAK #################
So, während ich das hier eingestellt habe, habe ich noch eine kleine Zeile ausprobiert, die mir unter vorbehalt anscheinend geholfen hat.
Da ich mir jetzt so viel Mühe mit dem Schreiben hier gegeben habe, muss der geneigte Leser, das halt alles lesen, ist aber für´s Nachvollziehen vielleicht nicht verkehrt. 😉
Also: Das ist mein heutiger Star!!
externalBlocks = div
Ob er das bleibt, wird sich zeigen und ich hoffe sehr, dass ich diesen Threat hier nicht noch mal befeuern muss...
Gruß
Torsten