Skip to content

Commit

Permalink
Merge branch '3.x' into feature/mixed-mode-improvements-v3
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszuznanski authored Oct 2, 2023
2 parents c1bf99e + 6cbfb2c commit d703452
Show file tree
Hide file tree
Showing 13 changed files with 137 additions and 86 deletions.
2 changes: 1 addition & 1 deletion Classes/DataProcessing/DatabaseQueryProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* bodytext = TEXT
* bodytext {
* field = bodytext
* parseFunc =< lib.parseFunc_links
* parseFunc =< lib.parseFunc_RTE
* }
* link = TEXT
* link {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ tt_content.text {
bodytext = TEXT
bodytext {
field = bodytext
parseFunc =< lib.parseFunc_links
parseFunc =< lib.parseFunc_RTE
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ tt_content.textmedia {
bodytext = TEXT
bodytext {
field = bodytext
parseFunc =< lib.parseFunc_links
parseFunc =< lib.parseFunc_RTE
}
gallery = TEXT
gallery {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ tt_content.textpic {
bodytext = TEXT
bodytext {
field = bodytext
parseFunc =< lib.parseFunc_links
parseFunc =< lib.parseFunc_RTE
}
gallery = TEXT
gallery {
Expand Down
69 changes: 41 additions & 28 deletions Configuration/TypoScript/2.x/Helper/ParseFunc.typoscript
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,40 @@ lib {
makelinks {
http {
keep = {$styles.content.links.keep}
extTarget.data = parameters:target
extTarget = {$styles.content.links.extTarget}
}

mailto {
keep = path
}
}

tags {
link = TEXT
link {
current = 1
typolink {
parameter.data = parameters : allParams
extTarget.data = parameters:target
}
parseFunc.constants = 1
}
a = TEXT
a {
current = 1
typolink {
parameter.data = parameters:href
title.data = parameters:title
ATagParams.data = parameters:allParams
target.data = parameters:target
extTarget.data = parameters:target
# 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
ifEmpty.override = {$styles.content.links.extTarget}
override.data = parameters:target
}
}
}
}

allowTags = {$styles.content.allowTags}
denyTags = *
sword = <span class="ce-sword">|</span>
# @deprecated since TYPO3 v12, remove with v13
constants = 1
nonTypoTagStdWrap {
HTMLparser = 1
Expand All @@ -51,19 +54,22 @@ lib {
parseFunc_RTE < lib.parseFunc
parseFunc_RTE {
# Processing <ol>, <ul> and <table> blocks separately
externalBlocks = article, aside, blockquote, div, dd, dl, footer, header, nav, ol, section, table, ul, pre
externalBlocks = article, aside, blockquote, div, dd, dl, footer, header, nav, ol, section, table, ul, pre, figure
externalBlocks {
ol {
stripNL = 1
stdWrap.parseFunc = < lib.parseFunc
stdWrap.parseFunc =< lib.parseFunc
}

ul {
stripNL = 1
stdWrap.parseFunc = < lib.parseFunc
stdWrap.parseFunc =< lib.parseFunc
}

pre {
stdWrap.parseFunc < lib.parseFunc
}

table {
stripNL = 1
stdWrap {
Expand All @@ -74,25 +80,34 @@ lib {
always = 1
list = contenttable
}

keepNonMatchedTags = 1
}
}

HTMLtableCells = 1
HTMLtableCells {
# Recursive call to self but without wrapping non-wrapped cell content
default.stdWrap {
parseFunc = < lib.parseFunc_RTE
parseFunc.nonTypoTagStdWrap.encapsLines.nonWrappedTag =
parseFunc =< lib.parseFunc_RTE
parseFunc.nonTypoTagStdWrap.encapsLines {
nonWrappedTag =
innerStdWrap_all.ifBlank =
}
}

addChr10BetweenParagraphs = 1
}
}

div {
stripNL = 1
callRecursive = 1
}

article < .div
aside < .div
figure < .div
blockquote < .div
footer < .div
header < .div
Expand All @@ -101,20 +116,23 @@ lib {
dl < .div
dd < .div
}

nonTypoTagStdWrap {
HTMLparser = 1
HTMLparser {
keepNonMatchedTags = 1
htmlSpecialChars = 2
}

encapsLines {
encapsTagList = p,pre,h1,h2,h3,h4,h5,h6,hr,dt
remapTag.DIV = P
nonWrappedTag = P
innerStdWrap_all.ifBlank = &nbsp;
}
HTMLparser = 1
HTMLparser {
keepNonMatchedTags = 1
htmlSpecialChars = 2
}
}
}

parseFunc_links {
htmlSanitize = 1
tags {
Expand All @@ -141,8 +159,3 @@ lib {
}
}
}





23 changes: 1 addition & 22 deletions Configuration/TypoScript/ContentElement/Shortcut.typoscript
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ tt_content.shortcut {
fields {
content {
fields {
shortcut = COA
shortcut =< lib.renderChildren
shortcut {
10 = RECORDS
10 {
Expand All @@ -13,27 +13,6 @@ tt_content.shortcut {
{$styles.content.shortcut.tables}.stdWrap.wrap = |###BREAK###
}
}
stdWrap {
innerWrap = [|]
split {
token = ###BREAK###
cObjNum = 1 |*|2|*| 3
1 {
current = 1
stdWrap.wrap = |
}

2 {
current = 1
stdWrap.wrap = ,|
}

3 {
current = 1
stdWrap.wrap = |
}
}
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Configuration/TypoScript/ContentElement/Text.typoscript
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ tt_content.text {
bodytext = TEXT
bodytext {
field = bodytext
parseFunc =< lib.parseFunc_links
parseFunc =< lib.parseFunc_RTE
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ tt_content.textmedia {
bodytext = TEXT
bodytext {
field = bodytext
parseFunc =< lib.parseFunc_links
parseFunc =< lib.parseFunc_RTE
}
gallery = TEXT
gallery {
Expand Down
2 changes: 1 addition & 1 deletion Configuration/TypoScript/ContentElement/Textpic.typoscript
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ tt_content.textpic {
bodytext = TEXT
bodytext {
field = bodytext
parseFunc =< lib.parseFunc_links
parseFunc =< lib.parseFunc_RTE
}
gallery = TEXT
gallery {
Expand Down
Loading

0 comments on commit d703452

Please sign in to comment.