fcb8fb4aa424119b48e35767b7594a0f816bddee
[Packages/TYPO3.CMS.git] / typo3 / sysext / css_styled_content / Configuration / TypoScript / Helper / ParseFunc.txt
1 # Creates persistent ParseFunc setup for non-HTML content. This is recommended to use (as a reference!)
2 lib.parseFunc {
3 makelinks = 1
4 makelinks.http.keep = {$styles.content.links.keep}
5 makelinks.http.extTarget < lib.parseTarget
6 makelinks.http.extTarget =
7 makelinks.http.extTarget.override = {$styles.content.links.extTarget}
8 makelinks.mailto.keep = path
9 tags {
10 link = TEXT
11 link {
12 current = 1
13 typolink.parameter.data = parameters : allParams
14 typolink.extTarget < lib.parseTarget
15 typolink.extTarget =
16 typolink.extTarget.override = {$styles.content.links.extTarget}
17 typolink.target < lib.parseTarget
18 typolink.target =
19 typolink.target.override = {$styles.content.links.target}
20 parseFunc.constants =1
21 }
22 a = TEXT
23 a {
24 current = 1
25 typolink {
26 parameter.data = parameters:href
27 title.data = parameters:title
28 ATagParams.data = parameters:allParams
29 target.data = parameters:target
30 extTarget = {$styles.content.links.extTarget}
31 extTarget.override.data = parameters:target
32 }
33 }
34 }
35 allowTags = {$styles.content.links.allowTags}
36 denyTags = *
37 sword = <span class="csc-sword">|</span>
38 constants = 1
39 nonTypoTagStdWrap.HTMLparser = 1
40 nonTypoTagStdWrap.HTMLparser {
41 keepNonMatchedTags = 1
42 htmlSpecialChars = 2
43 }
44 }
45
46 # good old parsefunc in "styles.content.parseFunc" is created for backwards compatibility. Don't use it, just ignore.
47 styles.content.parseFunc < lib.parseFunc
48
49 # Creates persistent ParseFunc setup for RTE content (which is mainly HTML) based on the "ts_css" transformation.
50 lib.parseFunc_RTE < lib.parseFunc
51 lib.parseFunc_RTE {
52 // makelinks >
53 # Processing <table> and <blockquote> blocks separately
54 externalBlocks = article, aside, blockquote, div, dd, dl, footer, header, nav, ol, section, table, ul, pre
55 externalBlocks {
56 # The blockquote content is passed into parseFunc again...
57 blockquote.stripNL=1
58 blockquote.callRecursive=1
59 table.stripNL=1
60 table.stdWrap.HTMLparser = 1
61 table.stdWrap.HTMLparser.tags.table.fixAttrib.class {
62 default = contenttable
63 always = 1
64 list = contenttable
65 }
66 table.stdWrap.HTMLparser.keepNonMatchedTags = 1
67 table.HTMLtableCells=1
68 table.HTMLtableCells {
69 # Recursive call to self but without wrapping non-wrapped cell content
70 default.stdWrap {
71 parseFunc =< lib.parseFunc_RTE
72 parseFunc.nonTypoTagStdWrap.encapsLines.nonWrappedTag =
73 }
74 addChr10BetweenParagraphs=1
75 }
76 div.stripNL = 1
77 div.callRecursive = 1
78 article < .div
79 aside < .div
80 footer < .div
81 header < .div
82 nav < .div
83 section < .div
84 # List processing
85 dl < .div
86 dd < .div
87 ol < .div
88 ul < .div
89 }
90 nonTypoTagStdWrap.encapsLines {
91 encapsTagList = p,pre,h1,h2,h3,h4,h5,h6,hr,dt,li
92 remapTag.DIV = P
93 nonWrappedTag = P
94 innerStdWrap_all.ifBlank = &nbsp;
95 addAttributes.P.class = bodytext
96 addAttributes.P.class.setOnly=blank
97 }
98 nonTypoTagStdWrap.HTMLparser = 1
99 nonTypoTagStdWrap.HTMLparser {
100 keepNonMatchedTags = 1
101 htmlSpecialChars = 2
102 }
103 }
104
105 # Creates a condition for targets. Not allowed in XHTML except for xhtml frames DTD
106 lib.parseTarget {
107 override =
108 override.if {
109 isTrue.data = TSFE:dtdAllowsFrames
110 }
111 }