Hallo,
ich habe folgende Probleme mit dem RTE.
Nach einem <hr /> Tag setzt der RTE immer automatisch ein leeres <p>-Tag ein, dass in der HTML-Quelltextansicht dess RTE nicht zu sehen ist, also nur im Frontend!
Wenn ich in einer Überschrift <h2> ein <acronym>-Tag platziere, wird es als Text ausgegeben. Bei einem <span> passiert das nicht, es wird regulär als HTML-Quelltext eingebunden.
(Folgendes Problem ist schon gelöst TS ist korrigiert)
Wenn ich ein Bild im Quelltext des RTE außerhalb eines <p>-Tags platziere, wird ein <p>-Tag darum erzeugt. Ich habe es schon mit verschiedenen Einstellungen im TS-Config probiert - ohne Erfolg.
Ich steige auch nicht zu 100% durch, da die Konfigurationsmöglichkeiten doch sehr komplex sind.
Vielleicht kann mir jemand bei der Lösung helfen, hier der TS-Code:
mod.web_view.type=1
mod.SHARED.colPos_list=0,2
lib.parseFunc_RTE.nonTypoTagStdWrap.encapsLines.addAttributes >
lib.parseFunc_RTE.nonTypoTagStdWrap.encapsLines.encapsTagList = cite, div, p, pre, hr, h1, h2, h3, h4, h5, h6
lib.parseFunc_RTE.externalBlocks = hr,ul,ol,table,img
# Contentelemente entfernen TSconfig
# header - Überschrift, text - Text, textpic - Text m/Bild, image - Bild, bullets - Punktliste, table - Tabelle, uploads - Dateilinks, multimedia - Multimedia, mailform - Formular, search - Suchen, login - Login, menu - Menü/Sitemap, shortcut - Datensatz einfügen, list - Plugin einfügen, html - HTML, script - Skript, splash - Textbox, div - Trenner
TCEFORM.tt_content.CType {
removeItems = multimedia,mailform,search,div,shortcut,list,html,script,splash,login,menu
}
# Seitentypen entfernen
# 1 - Standard 2 - Erweitert 3 - Externe URL 4 - Shortcut 5 - Nicht im Menü 6 - Backend Benutzer Bereich 7 - Mount Seite --div-- = Trennlinie 199 = Abstand 254 = Sysordner 255 = Recycler
TCEFORM.pages.doktype {
removeItems = 5,6,7,--div--,199,254,255
}
##### RTE #######
# Zuweisung der CSS-Datei
RTE.default.contentCSS = fileadmin/tpl/web/css/editor.css
RTE.default {
# zeigt alle CSS-Klassen die in formate.css vorhanden sind
showTagFreeClasses = 1
classesAnchor = intern, extern, email, landkarte
classesImage = bild-links, bild-rechts, bild-rechts-rand, bild-links-rand
# Anzeige von span-Klassen in der Dropdown-Box Text im RTE
classesCharacter = author
keepButtonGroupTogether = 1
# blendet Statusbar in htmlarea aus
showStatusBar = 0
# Use stylesheet file rather than the above mainStyleOverride and inlineStyle properties to style the contents (htmlArea RTE only)
ignoreMainStyleOverride = 1
defaultLinkTarget = _self
removeComments = 1
# entfernt neues Magic Image
blindImageOptions = magic
# Tabellen Editierungs-Optionen (cellspacing/ cellpadding / border)
disableSpacingFieldsetInTableOperations = 1
disableAlignmentFieldsetInTableOperations=1
disableColorFieldsetInTableOperations=1
disableLayoutFieldsetInTableOperations=1
disableBordersFieldsetInTableOperations=0
showButtons = cut,copy,paste,formatblock,class,textcolor,bold,orderedlist,unorderedlist,link,image,table,line,insertcharacter,blockstyle,blockstylelabel,chMode,abbr,acronym
hideButtons = center,showhelp,about
keepButtonGroupTogether = 1
hidePStyleItems = H1, H5, H6, PRE, ADRESS
dontConvBRtoParagraph = 1
## Enable the image button
showButtons := addToList(image)
## Tags allowed outside p and div
## Adding img tag to the default list
proc.allowTagsOutside := addToList(img)
## Do not remove img tags
proc.entryHTMLparser_db.tags.img >
}
# XHTML output
RTE.config.tt_content.bodytext.proc {
entryHTMLparser_db {
xhtml_cleaning = 1
overruleMode = ts_css
}
# kopiert die veränderte Einstellung für die Transformation des Inhaltes im Backend RTE in die Einstellung für den RTE im Frontend Editing.
RTE.default.FE.proc < RTE.default.proc
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
denyTags = font
# br wird nicht zu p konvertiert
dontConvBRtoParagraph = 1
# tags sind erlaubt außerhalb von p, div
allowTagsOutside = img,hr
# erlaubte attribute in p, div tags
keepPDIVattribs = align,class,style,id
overruleMode = ts_css
preserveTables = 1
entryHTMLparser_db = 1
keepPDIVattribs = xml:lang
# 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 = protect
}
# 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
tags.hr.allowedAttribs = class
# b und i tags werden ersetzt
tags.b.remap = strong
tags.i.remap = em
# bilder werden nicht entfernt
tags.img.allowedAttribs = style,class,id,src,alt,title
tags.img.rmTagIfNoAttrib = 1
rmTagIfNoAttrib = span,div,font
htmlSpecialChars = 0
keepNonMatchedTags = protect
}
}
Viele Grüße,
Sebastian