source: trunk/admin/inc/ckeditor/_source/core/dtd.js@ 239

Last change on this file since 239 was 239, checked in by luc, 9 years ago

Admin: correzione visulaizzazione immissione dati spoglio per Chrome e Safari - Aggiornamento dell'editor da FCKeditor a CKeditor , accessibili anche a Chrome e Safari.

  • Property svn:executable set to *
File size: 7.9 KB
Line 
1/*
2Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
3For licensing, see LICENSE.html or http://ckeditor.com/license
4*/
5
6/**
7 * @fileOverview Defines the {@link CKEDITOR.dtd} object, which holds the DTD
8 * mapping for XHTML 1.0 Transitional. This file was automatically
9 * generated from the file: xhtml1-transitional.dtd.
10 */
11
12/**
13 * @namespace Holds and object representation of the HTML DTD to be used by the
14 * editor in its internal operations.<br />
15 * <br />
16 * Each element in the DTD is represented by a property in this object. Each
17 * property contains the list of elements that can be contained by the element.
18 * Text is represented by the "#" property.<br />
19 * <br />
20 * Several special grouping properties are also available. Their names start
21 * with the "$" character.
22 * @example
23 * // Check if "div" can be contained in a "p" element.
24 * alert( !!CKEDITOR.dtd[ 'p' ][ 'div' ] ); "false"
25 * @example
26 * // Check if "p" can be contained in a "div" element.
27 * alert( !!CKEDITOR.dtd[ 'div' ][ 'p' ] ); "true"
28 * @example
29 * // Check if "p" is a block element.
30 * alert( !!CKEDITOR.dtd.$block[ 'p' ] ); "true"
31 */
32CKEDITOR.dtd = (function()
33{
34 var X = CKEDITOR.tools.extend,
35
36 A = {isindex:1,fieldset:1},
37 B = {input:1,button:1,select:1,textarea:1,label:1},
38 C = X({a:1},B),
39 D = X({iframe:1},C),
40 E = {hr:1,ul:1,menu:1,div:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,mark:1,time:1,meter:1,command:1,keygen:1,output:1,progress:1,audio:1,video:1,details:1,datagrid:1,datalist:1,blockquote:1,noscript:1,table:1,center:1,address:1,dir:1,pre:1,h5:1,dl:1,h4:1,noframes:1,h6:1,ol:1,h1:1,h3:1,h2:1},
41 F = {ins:1,del:1,script:1,style:1},
42 G = X({b:1,acronym:1,bdo:1,'var':1,'#':1,abbr:1,code:1,br:1,i:1,cite:1,kbd:1,u:1,strike:1,s:1,tt:1,strong:1,q:1,samp:1,em:1,dfn:1,span:1,wbr:1},F),
43 H = X({sub:1,img:1,object:1,sup:1,basefont:1,map:1,applet:1,font:1,big:1,small:1,mark:1},G),
44 I = X({p:1},H),
45 J = X({iframe:1},H,B),
46 K = {img:1,noscript:1,br:1,kbd:1,center:1,button:1,basefont:1,h5:1,h4:1,samp:1,h6:1,ol:1,h1:1,h3:1,h2:1,form:1,font:1,'#':1,select:1,menu:1,ins:1,abbr:1,label:1,code:1,table:1,script:1,cite:1,input:1,iframe:1,strong:1,textarea:1,noframes:1,big:1,small:1,span:1,hr:1,sub:1,bdo:1,'var':1,div:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,mark:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,audio:1,video:1,details:1,datagrid:1,datalist:1,object:1,sup:1,strike:1,dir:1,map:1,dl:1,applet:1,del:1,isindex:1,fieldset:1,ul:1,b:1,acronym:1,a:1,blockquote:1,i:1,u:1,s:1,tt:1,address:1,q:1,pre:1,p:1,em:1,dfn:1},
47
48 L = X({a:1},J),
49 M = {tr:1},
50 N = {'#':1},
51 O = X({param:1},K),
52 P = X({form:1},A,D,E,I),
53 Q = {li:1},
54 R = {style:1,script:1},
55 S = {base:1,link:1,meta:1,title:1},
56 T = X(S,R),
57 U = {head:1,body:1},
58 V = {html:1};
59
60 var block = {address:1,blockquote:1,center:1,dir:1,div:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,audio:1,video:1,details:1,datagrid:1,datalist:1,dl:1,fieldset:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,isindex:1,noframes:1,ol:1,p:1,pre:1,table:1,ul:1};
61
62 return /** @lends CKEDITOR.dtd */ {
63
64 // The "$" items have been added manually.
65
66 // List of elements living outside body.
67 $nonBodyContent: X(V,U,S),
68
69 /**
70 * List of block elements, like "p" or "div".
71 * @type Object
72 * @example
73 */
74 $block : block,
75
76 /**
77 * List of block limit elements.
78 * @type Object
79 * @example
80 */
81 $blockLimit : { body:1,div:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,audio:1,video:1,details:1,datagrid:1,datalist:1,td:1,th:1,caption:1,form:1 },
82
83 /**
84 * List of inline (&lt;span&gt; like) elements.
85 */
86 $inline : L, // Just like span.
87
88 /**
89 * list of elements that can be children at &lt;body&gt;.
90 */
91 $body : X({script:1,style:1}, block),
92
93 $cdata : {script:1,style:1},
94
95 /**
96 * List of empty (self-closing) elements, like "br" or "img".
97 * @type Object
98 * @example
99 */
100 $empty : {area:1,base:1,br:1,col:1,hr:1,img:1,input:1,link:1,meta:1,param:1,wbr:1},
101
102 /**
103 * List of list item elements, like "li" or "dd".
104 * @type Object
105 * @example
106 */
107 $listItem : {dd:1,dt:1,li:1},
108
109 /**
110 * List of list root elements.
111 * @type Object
112 * @example
113 */
114 $list: {ul:1,ol:1,dl:1},
115
116 /**
117 * Elements that accept text nodes, but are not possible to edit into
118 * the browser.
119 * @type Object
120 * @example
121 */
122 $nonEditable : {applet:1,button:1,embed:1,iframe:1,map:1,object:1,option:1,script:1,textarea:1,param:1,audio:1,video:1},
123
124 /**
125 * List of block tags with each one a singleton element lives in the corresponding structure for description.
126 */
127 $captionBlock : { caption:1, legend:1 },
128
129 /**
130 * List of elements that can be ignored if empty, like "b" or "span".
131 * @type Object
132 * @example
133 */
134 $removeEmpty : {abbr:1,acronym:1,address:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,s:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1,mark:1},
135
136 /**
137 * List of elements that have tabindex set to zero by default.
138 * @type Object
139 * @example
140 */
141 $tabIndex : {a:1,area:1,button:1,input:1,object:1,select:1,textarea:1},
142
143 /**
144 * List of elements used inside the "table" element, like "tbody" or "td".
145 * @type Object
146 * @example
147 */
148 $tableContent : {caption:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1},
149
150 html: U,
151 head: T,
152 style: N,
153 script: N,
154 body: P,
155 base: {},
156 link: {},
157 meta: {},
158 title: N,
159 col : {},
160 tr : {td:1,th:1},
161 img : {},
162 colgroup : {col:1},
163 noscript : P,
164 td : P,
165 br : {},
166 wbr : {},
167 th : P,
168 center : P,
169 kbd : L,
170 button : X(I,E),
171 basefont : {},
172 h5 : L,
173 h4 : L,
174 samp : L,
175 h6 : L,
176 ol : Q,
177 h1 : L,
178 h3 : L,
179 option : N,
180 h2 : L,
181 form : X(A,D,E,I),
182 select : {optgroup:1,option:1},
183 font : L,
184 ins : L,
185 menu : Q,
186 abbr : L,
187 label : L,
188 table : {thead:1,col:1,tbody:1,tr:1,colgroup:1,caption:1,tfoot:1},
189 code : L,
190 tfoot : M,
191 cite : L,
192 li : P,
193 input : {},
194 iframe : P,
195 strong : L,
196 textarea : N,
197 noframes : P,
198 big : L,
199 small : L,
200 span : L,
201 hr : {},
202 dt : L,
203 sub : L,
204 optgroup : {option:1},
205 param : {},
206 bdo : L,
207 'var' : L,
208 div : P,
209 object : O,
210 sup : L,
211 dd : P,
212 strike : L,
213 area : {},
214 dir : Q,
215 map : X({area:1,form:1,p:1},A,F,E),
216 applet : O,
217 dl : {dt:1,dd:1},
218 del : L,
219 isindex : {},
220 fieldset : X({legend:1},K),
221 thead : M,
222 ul : Q,
223 acronym : L,
224 b : L,
225 a : J,
226 blockquote : P,
227 caption : L,
228 i : L,
229 u : L,
230 tbody : M,
231 s : L,
232 address : X(D,I),
233 tt : L,
234 legend : L,
235 q : L,
236 pre : X(G,C),
237 p : L,
238 em : L,
239 dfn : L,
240 //HTML5
241 section : P,
242 header : P,
243 footer : P,
244 nav : P,
245 article : P,
246 aside : P,
247 figure: P,
248 dialog : P,
249 hgroup : P,
250 mark : L,
251 time : L,
252 meter : L,
253 menu : L,
254 command : L,
255 keygen : L,
256 output : L,
257 progress : O,
258 audio : O,
259 video : O,
260 details : O,
261 datagrid : O,
262 datalist : O
263 };
264})();
265
266// PACKAGER_RENAME( CKEDITOR.dtd )
Note: See TracBrowser for help on using the repository browser.