source: sandbox/2.3-MailArchiver/workflow/js/fckeditor/editor/_source/internals/fcklistslib.js @ 6779

Revision 6779, 2.4 KB checked in by rafaelraymundo, 12 years ago (diff)

Ticket #2946 - Liberado Expresso(branch 2.3) integrado ao MailArchiver?.

Line 
1/*
2 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
3 * Copyright (C) 2003-2007 Frederico Caldeira Knabben
4 *
5 * == BEGIN LICENSE ==
6 *
7 * Licensed under the terms of any of the following licenses at your
8 * choice:
9 *
10 *  - GNU General Public License Version 2 or later (the "GPL")
11 *    http://www.gnu.org/licenses/gpl.html
12 *
13 *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
14 *    http://www.gnu.org/licenses/lgpl.html
15 *
16 *  - Mozilla Public License Version 1.1 or later (the "MPL")
17 *    http://www.mozilla.org/MPL/MPL-1.1.html
18 *
19 * == END LICENSE ==
20 *
21 * Library of keys collections.
22 *
23 * Test have shown that check for the existence of a key in an object is the
24 * most efficient list entry check (10x faster that regex). Example:
25 *              if ( FCKListsLib.<ListName>[key] != null )
26 */
27
28var FCKListsLib =
29{
30        // We are not handling <ins> and <del> as block elements, for now.
31        BlockElements : { address:1,blockquote:1,center:1,div:1,dl:1,fieldset:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,noscript:1,ol:1,p:1,pre:1,script:1,table:1,ul:1 },
32
33        // Block elements that may be filled with &nbsp; if empty.
34        NonEmptyBlockElements : { p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,address:1,pre:1,ol:1,ul:1,li:1,td:1,th:1 },
35
36        // Inline elements which MUST have child nodes.
37        InlineChildReqElements : { abbr:1,acronym: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,samp:1,small:1,span:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1 },
38
39        // Elements marked as empty "Empty" in the XHTML DTD.
40        EmptyElements : { base:1,meta:1,link:1,hr:1,br:1,param:1,img:1,area:1,input:1 },
41       
42        // Elements that may be considered the "Block boundary" in an element path.
43        PathBlockElements : { address:1,blockquote:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,ol:1,ul:1,li:1,dt:1,de:1 },
44       
45        // Elements that may be considered the "Block limit" in an element path.
46        PathBlockLimitElements : { body:1,td:1,th:1,caption:1,form:1 },
47
48        // Final setup of FCKListsLib once the editor is loaded (at FCK.StartEditor).
49        // TODO: For v3, there should be a generic way to register to the editor
50        // startup event, so this function would not be needed to be defined here, not
51        // even be called at FCK.StartEditor.
52        Setup : function()
53        {
54                // <div> is considered a block element only if EnterMode=div, otherwise it is a block limit.
55                if ( FCKConfig.EnterMode == 'div' )
56                        this.PathBlockElements.div = 1 ;
57                else
58                        this.PathBlockLimitElements.div = 1 ;
59        }
60} ;
Note: See TracBrowser for help on using the repository browser.