1 | /*
|
---|
2 | Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
|
---|
3 | For 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 | * Holds and object representation of the HTML DTD to be used by the editor in
|
---|
14 | * its internal operations.
|
---|
15 | *
|
---|
16 | * Each element in the DTD is represented by a
|
---|
17 | * property in this object. Each property contains the list of elements that
|
---|
18 | * can be contained by the element. Text is represented by the "#" property.
|
---|
19 | *
|
---|
20 | * Several special grouping properties are also available. Their names start
|
---|
21 | * with the "$" character.
|
---|
22 | * @namespace
|
---|
23 | * @example
|
---|
24 | * // Check if "div" can be contained in a "p" element.
|
---|
25 | * alert( !!CKEDITOR.dtd[ 'p' ][ 'div' ] ); "false"
|
---|
26 | * @example
|
---|
27 | * // Check if "p" can be contained in a "div" element.
|
---|
28 | * alert( !!CKEDITOR.dtd[ 'div' ][ 'p' ] ); "true"
|
---|
29 | * @example
|
---|
30 | * // Check if "p" is a block element.
|
---|
31 | * alert( !!CKEDITOR.dtd.$block[ 'p' ] ); "true"
|
---|
32 | */
|
---|
33 | CKEDITOR.dtd = (function()
|
---|
34 | {
|
---|
35 | var X = CKEDITOR.tools.extend,
|
---|
36 |
|
---|
37 | A = {isindex:1,fieldset:1},
|
---|
38 | B = {input:1,button:1,select:1,textarea:1,label:1},
|
---|
39 | C = X({a:1},B),
|
---|
40 | D = X({iframe:1},C),
|
---|
41 | E = {hr:1,ul:1,menu:1,div: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},
|
---|
42 | F = {ins:1,del:1,script:1},
|
---|
43 | 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},F),
|
---|
44 | H = X({sub:1,img:1,object:1,sup:1,basefont:1,map:1,applet:1,font:1,big:1,small:1},G),
|
---|
45 | I = X({p:1},H),
|
---|
46 | J = X({iframe:1},H,B),
|
---|
47 | 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,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},
|
---|
48 |
|
---|
49 | L = X({a:1},J),
|
---|
50 | M = {tr:1},
|
---|
51 | N = {'#':1},
|
---|
52 | O = X({param:1},K),
|
---|
53 | P = X({form:1},A,D,E,I),
|
---|
54 | Q = {li:1};
|
---|
55 |
|
---|
56 | var block = {address:1,blockquote:1,center:1,dir:1,div:1,dl:1,fieldset:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,isindex:1,menu:1,noframes:1,ol:1,p:1,pre:1,table:1,ul:1};
|
---|
57 |
|
---|
58 | return /** @lends CKEDITOR.dtd */ {
|
---|
59 |
|
---|
60 | // The "$" items have been added manually.
|
---|
61 |
|
---|
62 | /**
|
---|
63 | * List of block elements, like "p" or "div".
|
---|
64 | * @type Object
|
---|
65 | * @example
|
---|
66 | */
|
---|
67 | $block : block,
|
---|
68 |
|
---|
69 | $body : X({script:1}, block),
|
---|
70 |
|
---|
71 | $cdata : {script:1,style:1},
|
---|
72 |
|
---|
73 | /**
|
---|
74 | * List of empty (self-closing) elements, like "br" or "img".
|
---|
75 | * @type Object
|
---|
76 | * @example
|
---|
77 | */
|
---|
78 | $empty : {area:1,base:1,br:1,col:1,hr:1,img:1,input:1,link:1,meta:1,param:1},
|
---|
79 |
|
---|
80 | /**
|
---|
81 | * List of list item elements, like "li" or "dd".
|
---|
82 | * @type Object
|
---|
83 | * @example
|
---|
84 | */
|
---|
85 | $listItem : {dd:1,dt:1,li:1},
|
---|
86 |
|
---|
87 | /**
|
---|
88 | * List of list root elements.
|
---|
89 | * @type Object
|
---|
90 | * @example
|
---|
91 | */
|
---|
92 | $list: { ul:1,ol:1,dl:1},
|
---|
93 |
|
---|
94 | /**
|
---|
95 | * Elements that accept text nodes, but are not possible to edit into
|
---|
96 | * the browser.
|
---|
97 | * @type Object
|
---|
98 | * @example
|
---|
99 | */
|
---|
100 | $nonEditable : {applet:1,button:1,embed:1,iframe:1,map:1,object:1,option:1,script:1,textarea:1},
|
---|
101 |
|
---|
102 | /**
|
---|
103 | * List of elements that can be ignored if empty, like "b" or "span".
|
---|
104 | * @type Object
|
---|
105 | * @example
|
---|
106 | */
|
---|
107 | $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},
|
---|
108 |
|
---|
109 | /**
|
---|
110 | * List of elements that have tabindex set to zero by default.
|
---|
111 | * @type Object
|
---|
112 | * @example
|
---|
113 | */
|
---|
114 | $tabIndex : {a:1,area:1,button:1,input:1,object:1,select:1,textarea:1},
|
---|
115 |
|
---|
116 | /**
|
---|
117 | * List of elements used inside the "table" element, like "tbody" or "td".
|
---|
118 | * @type Object
|
---|
119 | * @example
|
---|
120 | */
|
---|
121 | $tableContent : {caption:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1},
|
---|
122 |
|
---|
123 | col : {},
|
---|
124 | tr : {td:1,th:1},
|
---|
125 | img : {},
|
---|
126 | colgroup : {col:1},
|
---|
127 | noscript : P,
|
---|
128 | td : P,
|
---|
129 | br : {},
|
---|
130 | th : P,
|
---|
131 | center : P,
|
---|
132 | kbd : L,
|
---|
133 | button : X(I,E),
|
---|
134 | basefont : {},
|
---|
135 | h5 : L,
|
---|
136 | h4 : L,
|
---|
137 | samp : L,
|
---|
138 | h6 : L,
|
---|
139 | ol : Q,
|
---|
140 | h1 : L,
|
---|
141 | h3 : L,
|
---|
142 | option : N,
|
---|
143 | h2 : L,
|
---|
144 | form : X(A,D,E,I),
|
---|
145 | select : {optgroup:1,option:1},
|
---|
146 | font : L,
|
---|
147 | ins : P,
|
---|
148 | menu : Q,
|
---|
149 | abbr : L,
|
---|
150 | label : L,
|
---|
151 | table : {thead:1,col:1,tbody:1,tr:1,colgroup:1,caption:1,tfoot:1},
|
---|
152 | code : L,
|
---|
153 | script : N,
|
---|
154 | tfoot : M,
|
---|
155 | cite : L,
|
---|
156 | li : P,
|
---|
157 | input : {},
|
---|
158 | iframe : P,
|
---|
159 | strong : L,
|
---|
160 | textarea : N,
|
---|
161 | noframes : P,
|
---|
162 | big : L,
|
---|
163 | small : L,
|
---|
164 | span : L,
|
---|
165 | hr : {},
|
---|
166 | dt : L,
|
---|
167 | sub : L,
|
---|
168 | optgroup : {option:1},
|
---|
169 | param : {},
|
---|
170 | bdo : L,
|
---|
171 | 'var' : L,
|
---|
172 | div : P,
|
---|
173 | object : O,
|
---|
174 | sup : L,
|
---|
175 | dd : P,
|
---|
176 | strike : L,
|
---|
177 | area : {},
|
---|
178 | dir : Q,
|
---|
179 | map : X({area:1,form:1,p:1},A,F,E),
|
---|
180 | applet : O,
|
---|
181 | dl : {dt:1,dd:1},
|
---|
182 | del : P,
|
---|
183 | isindex : {},
|
---|
184 | fieldset : X({legend:1},K),
|
---|
185 | thead : M,
|
---|
186 | ul : Q,
|
---|
187 | acronym : L,
|
---|
188 | b : L,
|
---|
189 | a : J,
|
---|
190 | blockquote : P,
|
---|
191 | caption : L,
|
---|
192 | i : L,
|
---|
193 | u : L,
|
---|
194 | tbody : M,
|
---|
195 | s : L,
|
---|
196 | address : X(D,I),
|
---|
197 | tt : L,
|
---|
198 | legend : L,
|
---|
199 | q : L,
|
---|
200 | pre : X(G,C),
|
---|
201 | p : L,
|
---|
202 | em : L,
|
---|
203 | dfn : L
|
---|
204 | };
|
---|
205 | })();
|
---|
206 |
|
---|
207 | // PACKAGER_RENAME( CKEDITOR.dtd )
|
---|