Skip to content

Instantly share code, notes, and snippets.

Created April 1, 2013 14:49
Show Gist options
  • Save anonymous/f8b80ac1f0019adefdfc to your computer and use it in GitHub Desktop.
Save anonymous/f8b80ac1f0019adefdfc to your computer and use it in GitHub Desktop.
RTE: UserElements und spitze Klammern Problem
Page TSConfig:
----------------------------
// add custom tag plugin to RTE buttons
RTE.default.showButtons := addToList(user)
RTE.default.hideButtons := removeFromList(user)
// allowed/denied tags
RTE.default.proc.allowTags := addToList(invers)
RTE.default.proc.denyTags := removeFromList(invers)
// HTMLparser_rte settings
RTE.default.proc.HTMLparser_rte = 0
// don't mask special html characters like < or >
RTE.default.proc.HTMLparser_rte.htmlSpecialChars = 0
// protect specific, user defined tags
RTE.default.proc.HTMLparser_rte.tags.invers.protect = 1
// entryHTMLparser_db settings
// special html characters like < or > will be stored unmasked (get masked by re-display in RTE)
RTE.default.proc.entryHTMLparser_db.htmlSpecialChars = -1
// protect specific tag
RTE.default.proc.entryHTMLparser_db.tags.invers.protect = 1
// protect non matching tags
RTE.default.proc.entryHTMLparser_db.keepNonMatchedTags = protect
// exitHTMLparser_db settings
RTE.default.proc.exitHTMLparser_db = 1
// protected non matched tags during fetching from database
RTE.default.proc.exitHTMLparser_db.keepNonMatchedTags = 1
// don't mask html characters like < or >
RTE.default.proc.exitHTMLparser_db.htmlSpecialChars = 0
// RTE plugin "user" settings
// define group tag name
RTE.default.userElements.10 = Own Tags
// tag configuration
RTE.default.userElements.10.1 = INVERS
RTE.default.userElements.10.1.description = The selected text will be wrapped with <invers></invers>
RTE.default.userElements.10.1.mode = wrap
RTE.default.userElements.10.1.content = &lt;invers&gt;|&lt;/invers&gt;
=========================================
und Template Setup:
------------
lib.parseFunc_RTE.allowTags:=addToList(invers)
lib.parseFunc.allowTags:=addToList(invers)
lib.parseFunc_RTE.tags.invers=TEXT
lib.parseFunc_RTE.tags.invers {
# mit current=1 enthält man den aktuellen Inhalt des Tags
current=1
# eigenes wrap, z. B. für Boxen
wrap=<strong class="inverted">|</strong>
# Leerzeilen vor und nach dem Inhalt des Tags entfernen
stripNL=1
}
lib.parseFunc.tags.invers=TEXT
lib.parseFunc.tags.invers {
# mit current=1 enthält man den aktuellen Inhalt des Tags
current=1
# eigenes wrap, z. B. für Boxen
wrap=<strong class="inverted">|</strong>
# Leerzeilen vor und nach dem Inhalt des Tags entfernen
stripNL=1
}
lib.parseFunc.nonTypoTagStdWrap.HTMLparser.tags.invers = < lib.parseFunc.tags.invers
lib.parseFunc_RTE.nonTypoTagStdWrap.HTMLparser.tags.invers = lib.parseFunc_RTE.tags.invers
lib.stdheader.10.setCurrent.parseFunc =< lib.parseFunc
lib.stdheader.10.setCurrent.htmlSpecialChars = 0
tt_content.text.20.parseFunc.tags.star = < lib.parseFunc_RTE.tags.invers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment