db63e14ff9887519f193d1f5e663cdbd75a6e3dd
[Packages/TYPO3.CMS.git] / typo3 / sysext / rtehtmlarea / Documentation / DefaultConfigurations / Default / Index.rst
1 .. ==================================================
2 .. FOR YOUR INFORMATION
3 .. --------------------------------------------------
4 .. -*- coding: utf-8 -*- with BOM.
5
6 .. include:: ../../Includes.txt
7
8
9
10 .. _default-configuration:
11
12 Default configuration of RTE content transformation
13 ---------------------------------------------------
14
15 This default configuration establishes default settings in Page
16 TSconfig for RTE content transformation.
17
18 For documentation of RTE tranformations, see:
19 `http://docs.typo3.org/typo3cms/CoreApiReference/Rte/Transformations/Index.html
20 <http://docs.typo3.org/typo3cms/CoreApiReference/Rte/Transformations/Index.html>`_
21
22 For documentation of Page TSconfig configuration of RTE processing, see:
23 `http://docs.typo3.org/typo3cms/CoreApiReference/Rte/Transformations/Tsconfig/Index.html
24 <http://docs.typo3.org/typo3cms/CoreApiReference/Rte/Transformations/Tsconfig/Index.html>`_
25
26 For documentation of the HTMLparser, see:
27 `http://docs.typo3.org/typo3cms/TyposcriptReference/Functions/Htmlparser/Index.html
28 <http://docs.typo3.org/typo3cms/TyposcriptReference/Functions/Htmlparser/Index.html>`_
29
30 For documentation of RTE settings in TCA, see:
31 `http://docs.typo3.org/typo3cms/TCAReference/AdditionalFeatures/SpecialConfigurationOptions/Index.html
32 <http://docs.typo3.org/typo3cms/TCAReference/AdditionalFeatures/SpecialConfigurationOptions/Index.html>`_
33
34
35 .. _default-configuration-page-tsconfig:
36
37 The following is inserted in Page TSconfig:
38 """""""""""""""""""""""""""""""""""""""""""
39
40 ## Default RTE processing rules
41
42 ::
43
44    RTE.default.proc {
45
46 ## TRANSFORMATION METHOD
47
48 ## We assume that CSS Styled Content is used.
49
50 ::
51
52       overruleMode = ts_css
53
54 ## DO NOT CONVERT BR TAGS INTO LINEBREAKS
55
56 ## br tags in the content are assumed to be intentional.
57
58 ::
59
60       dontConvBRtoParagraph = 1
61
62 ## PRESERVE DIV SECTIONS - DO NOT REMAP TO P
63
64 ::
65
66       preserveDIVSections = 1
67
68 ## TAGS ALLOWED OUTSIDE P & DIV
69
70 ::
71
72       allowTagsOutside = address, article, aside, blockquote, footer, header, hr, nav, section
73
74 ## TAGS ALLOWED
75
76 ## Added to the default internal list: b,i,u,a,img,br,div,center,pre,f
77 ont,hr,sub,sup,p,strong,em,li,ul,ol,blockquote,strike,span
78
79 ## But, for the sake of clarity, we use a complete list in alphabetic
80 order.
81
82 ## center, font, link, meta, o:p, strike, sdfield, style, title and u
83 will be removed on entry (see below).
84
85 ## b and i will be remapped on exit (see below).
86
87 ## Note that the link accessibility feature of htmlArea RTE does
88 insert img tags.
89
90 ::
91
92       allowTags = a, abbr, acronym, address, article, aside, b, bdo, big, blockquote, br, caption, center, cite, code, col, colgroup, dd, del, dfn, dl, div, dt, em, font, footer
93       allowTags := addToList(header, h1, h2, h3, h4, h5, h6, hr, i, img, ins, kbd, label, li, link, meta, nav, ol, p, pre, q, samp, sdfield, section, small)
94       allowTags := addToList(span, strike, strong, style, sub, sup, table, thead, tbody, tfoot, td, th, tr, title, tt, u, ul, var)
95
96 ## TAGS DENIED
97
98 ## Make sure we can set rules on any tag listed in allowTags.
99
100 ::
101
102       denyTags >
103
104 ## ALLOWED P & DIV ATTRIBUTES
105
106 ## Attributes class and align are always preserved
107
108 ## Align attribute will be unset on entry (see below)
109
110 ## This is a list of additional attributes to keep
111
112 ::
113
114       keepPDIVattribs = id, title, dir, lang, xml:lang, itemscope, itemtype, itemprop
115
116 ## ALLOW TO WRITE ABOUT HTML
117
118 ::
119
120       dontUndoHSC_db = 1
121       dontHSC_rte = 1
122
123 ## CONTENT TO DATABASE
124
125 ::
126
127       entryHTMLparser_db = 1
128       entryHTMLparser_db {
129
130 ## TAGS ALLOWED
131
132 ## Always use the same list of allowed tags.
133
134 ::
135
136               allowTags < RTE.default.proc.allowTags
137
138 ## TAGS DENIED
139
140 ## Make sure we can set rules on any tag listed in allowTags.
141
142 ::
143
144               denyTags >
145
146 ## AVOID CONTENT BEING HSC'ed TWICE
147
148 ::
149
150               htmlSpecialChars = 0
151
152 ::
153
154               tags {
155
156 ## REMOVE IMG TAGS
157
158 ::
159
160                       img.allowedAttribs = 0
161                            img.rmTagIfNoAttrib = 1
162
163 ## CLEAN ATTRIBUTES ON THE FOLLOWING TAGS
164
165 ::
166
167                       span.fixAttrib.style.unset = 1
168                            span.allowedAttribs = id, title, dir, lang, xml:lang, class, itemscope, itemtype, itemprop
169                            span.rmTagIfNoAttrib = 1
170                            p {
171                                    allowedAttribs = id, title, dir, lang, xml:lang, class, itemscope, itemtype, itemprop
172                                    fixAttrib.align.unset = 1
173                            }
174                            div < .p
175                            hr.allowedAttribs = class
176                            b.allowedAttribs  < .span.allowedAttribs
177                            bdo.allowedAttribs  < .span.allowedAttribs
178                            big.allowedAttribs  < .span.allowedAttribs
179                            blockquote.allowedAttribs  < .span.allowedAttribs
180                            cite.allowedAttribs  < .span.allowedAttribs
181                            code.allowedAttribs  < .span.allowedAttribs
182                            del.allowedAttribs  < .span.allowedAttribs
183                            dfn.allowedAttribs  < .span.allowedAttribs
184                            em.allowedAttribs  < .span.allowedAttribs
185                            i.allowedAttribs  < .span.allowedAttribs
186                            ins.allowedAttribs  < .span.allowedAttribs
187                            kbd.allowedAttribs  < .span.allowedAttribs
188                            label.allowedAttribs  < .span.allowedAttribs
189                            q.allowedAttribs  < .span.allowedAttribs
190                            samp.allowedAttribs  < .span.allowedAttribs
191                            small.allowedAttribs  < .span.allowedAttribs
192                            strike.allowedAttribs  < .span.allowedAttribs
193                            strong.allowedAttribs  < .span.allowedAttribs
194                            sub.allowedAttribs  < .span.allowedAttribs
195                            sup.allowedAttribs  < .span.allowedAttribs
196                            tt.allowedAttribs  < .span.allowedAttribs
197                            u.allowedAttribs  < .span.allowedAttribs
198                            var.allowedAttribs  < .span.allowedAttribs
199                    }
200
201 ## REMOVE OPEN OFFICE META DATA TAGS, WORD 2003 TAGS, LINK, META,
202 STYLE AND TITLE TAGS, AND DEPRECATED HTML TAGS
203
204 ## We use this rule instead of the denyTags rule so that we can
205 protect custom tags without protecting these unwanted tags.
206
207 ::
208
209               removeTags = center, font, link, o:p, sdfield, meta, style, title, strike, u
210
211 ## PROTECT CUSTOM TAGS
212
213 ::
214
215               keepNonMatchedTags = protect
216            }
217
218 ::
219
220       HTMLparser_db {
221
222 ## STRIP ALL ATTRIBUTES FROM THESE TAGS
223
224 ## If this list of tags is not set, it will default to:
225 b,i,u,br,center,hr,sub,sup,strong,em,li,ul,ol,blockquote,strike.
226
227 ## However, we want to keep xml:lang attribute on most tags and tags
228 from the default list where cleaned on entry.
229
230 ::
231
232               noAttrib = br
233
234 ## XHTML COMPLIANCE
235
236 ## Note that applying xhtml\_cleaning on exit would break non-standard
237 attributes of typolink tags
238
239 ::
240
241               xhtml_cleaning = 1
242            }
243
244 ::
245
246       exitHTMLparser_db = 1
247            exitHTMLparser_db {
248
249 ## KEEP ALL TAGS
250
251 ## Unwanted tags were removed on entry.
252
253 ## Without this rule, the parser will remove all tags! Presumably,
254 this rule will be more efficient than repeating the allowTags rule
255
256 ::
257
258               keepNonMatchedTags = 1
259
260 ## AVOID CONTENT BEING HSC'ed TWICE
261
262 ::
263
264               htmlSpecialChars = 0
265            }
266    }
267
268 ## Use same RTE processing rules in FE
269
270 ::
271
272    RTE.default.FE.proc < RTE.default.proc
273
274 ## RTE processing rules for bodytext column of tt\_content table
275
276 ## Erase settings from other extensions
277
278 ::
279
280    RTE.config.tt_content.bodytext >
281
282 ## Make sure we use ts\_css transformation
283
284 ::
285
286    RTE.config.tt_content.bodytext.proc.overruleMode = ts_css
287    RTE.config.tt_content.bodytext.types.text.proc.overruleMode = ts_css
288    RTE.config.tt_content.bodytext.types.textpic.proc.overruleMode = ts_css
289
290
291