ds-site/Configuration/TypoScript/Setup/ContentElements/ParseFunc.typoscript

128 lines
3.4 KiB
Text
Raw Permalink Normal View History

temp.removeBlankLines {
search = #\r\n\r\n#
replace {
cObject = COA
cObject {
1 = TEXT
1.char = 13
2 = TEXT
2.char = 10
}
}
useRegExp = 1
}
2019-11-15 00:27:23 +01:00
# Creates persistent ParseFunc setup for non-HTML content.
lib.parseFunc {
makelinks = 1
makelinks {
http {
keep = {$styles.content.links.keep}
extTarget = _blank
2019-11-15 00:27:23 +01:00
}
mailto {
keep = path
}
}
tags {
a = TEXT
a {
current = 1
typolink {
parameter.data = parameters:href
title.data = parameters:title
ATagParams.data = parameters:allParams
# the target attribute takes precedence over config.intTarget
target.ifEmpty.data = parameters:target
# the target attribute takes precedence over the constant (styles.content.links.extTarget)
# which takes precedence over config.extTarget
# do not pass extTarget as reference, as it might not be set resulting in the string being
# written to the target attribute
extTarget.ifEmpty < config.extTarget
extTarget.override.data = parameters:target
}
}
2019-11-15 00:27:23 +01:00
pre = USER
pre {
userFunc = DanielSiepmann\DsSite\UserFunction\CodeHighlighting->preTag
}
}
allowTags = a, abbr, acronym, address, b, bdo, big, blockquote, br, caption, center, cite, code, dd, del, dfn, dl, div, dt, em, h3, h4, h5, h6, hr, i, img, ins, kbd, label, li, link, ol, p, pre, q, s, samp, sdfield, small, span, strike, strong, sub, sup, title, tt, u, ul, var
denyTags = *
sword = <span class="ce-sword">|</span>
constants = 1
nonTypoTagStdWrap {
HTMLparser = 1
HTMLparser {
keepNonMatchedTags = 1
htmlSpecialChars = 2
}
}
}
# Creates persistent ParseFunc setup for RTE content (which is mainly HTML) based on the "default" transformation.
lib.parseFunc_RTE < lib.parseFunc
lib.parseFunc_RTE {
# Processing <ol>, <ul> and <table> blocks separately
externalBlocks = blockquote, div, dd, dl, ol, ul, pre
2019-11-15 00:27:23 +01:00
externalBlocks {
ol {
stripNL = 1
stdWrap.parseFunc = < lib.parseFunc
}
ul < .ol
2019-11-15 00:27:23 +01:00
pre {
stripNl = 1
2019-11-15 00:27:23 +01:00
stdWrap.parseFunc < lib.parseFunc
}
div {
stripNL = 1
callRecursive = 1
}
blockquote < .div
dl < .div
dd < .div
}
2020-01-10 17:22:42 +01:00
2019-11-15 00:27:23 +01:00
plainTextStdWrap {
replacement {
10 < temp.removeBlankLines
2020-01-10 17:22:42 +01:00
11 {
search = #\r\n#
replace =
useRegExp = 1
}
2019-11-15 00:27:23 +01:00
}
}
2020-01-10 17:22:42 +01:00
2019-11-15 00:27:23 +01:00
nonTypoTagStdWrap {
encapsLines {
encapsTagList = p,h1,h2,h3,h4,h5,h6,hr,dt
2019-11-15 00:27:23 +01:00
remapTag.DIV = P
nonWrappedTag = P
innerStdWrap_all.ifBlank = &nbsp;
}
HTMLparser = 1
HTMLparser {
keepNonMatchedTags = 1
htmlSpecialChars = 2
}
}
}
lib.parseFunc_abstract < lib.parseFunc
lib.parseFunc_abstract {
plainTextStdWrap {
replacement {
10 < temp.removeBlankLines
}
}
nonTypoTagStdWrap {
encapsLines {
encapsTagList = p
nonWrappedTag = P
}
}
}