2 Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
\r
3 For licensing, see LICENSE.html or http://ckeditor.com/license
\r
7 * @fileOverview Defines the {@link CKEDITOR.dtd} object, which holds the DTD
\r
8 * mapping for XHTML 1.0 Transitional. This file was automatically
\r
9 * generated from the file: xhtml1-transitional.dtd.
\r
13 * @namespace Holds and object representation of the HTML DTD to be used by the
\r
14 * editor in its internal operations.<br />
\r
16 * Each element in the DTD is represented by a property in this object. Each
\r
17 * property contains the list of elements that can be contained by the element.
\r
18 * Text is represented by the "#" property.<br />
\r
20 * Several special grouping properties are also available. Their names start
\r
21 * with the "$" character.
\r
23 * // Check if "div" can be contained in a "p" element.
\r
24 * alert( !!CKEDITOR.dtd[ 'p' ][ 'div' ] ); "false"
\r
26 * // Check if "p" can be contained in a "div" element.
\r
27 * alert( !!CKEDITOR.dtd[ 'div' ][ 'p' ] ); "true"
\r
29 * // Check if "p" is a block element.
\r
30 * alert( !!CKEDITOR.dtd.$block[ 'p' ] ); "true"
\r
32 CKEDITOR.dtd = (function()
\r
34 var X = CKEDITOR.tools.extend,
\r
36 A = {isindex:1,fieldset:1},
\r
37 B = {input:1,button:1,select:1,textarea:1,label:1},
\r
39 D = X({iframe:1},C),
\r
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},
\r
41 F = {ins:1,del:1,script:1,style:1},
\r
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),
\r
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),
\r
45 J = X({iframe:1},H,B),
\r
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},
\r
52 P = X({form:1},A,D,E,I),
\r
54 R = {style:1,script:1},
\r
55 S = {base:1,link:1,meta:1,title:1},
\r
57 U = {head:1,body:1},
\r
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};
\r
62 return /** @lends CKEDITOR.dtd */ {
\r
64 // The "$" items have been added manually.
\r
66 // List of elements living outside body.
\r
67 $nonBodyContent: X(V,U,S),
\r
70 * List of block elements, like "p" or "div".
\r
77 * List of block limit elements.
\r
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 },
\r
84 * List of inline (<span> like) elements.
\r
86 $inline : L, // Just like span.
\r
89 * list of elements that can be children at <body>.
\r
91 $body : X({script:1,style:1}, block),
\r
93 $cdata : {script:1,style:1},
\r
96 * List of empty (self-closing) elements, like "br" or "img".
\r
100 $empty : {area:1,base:1,br:1,col:1,hr:1,img:1,input:1,link:1,meta:1,param:1,wbr:1},
\r
103 * List of list item elements, like "li" or "dd".
\r
107 $listItem : {dd:1,dt:1,li:1},
\r
110 * List of list root elements.
\r
114 $list: {ul:1,ol:1,dl:1},
\r
117 * Elements that accept text nodes, but are not possible to edit into
\r
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},
\r
125 * List of block tags with each one a singleton element lives in the corresponding structure for description.
\r
127 $captionBlock : { caption:1, legend:1 },
\r
130 * List of elements that can be ignored if empty, like "b" or "span".
\r
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},
\r
137 * List of elements that have tabindex set to zero by default.
\r
141 $tabIndex : {a:1,area:1,button:1,input:1,object:1,select:1,textarea:1},
\r
144 * List of elements used inside the "table" element, like "tbody" or "td".
\r
148 $tableContent : {caption:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1},
\r
162 colgroup : {col:1},
\r
182 select : {optgroup:1,option:1},
\r
188 table : {thead:1,col:1,tbody:1,tr:1,colgroup:1,caption:1,tfoot:1},
\r
204 optgroup : {option:1},
\r
215 map : X({area:1,form:1,p:1},A,F,E),
\r
220 fieldset : X({legend:1},K),
\r
266 // PACKAGER_RENAME( CKEDITOR.dtd )
\r