CLICK HERE TO BUY IT TODAY! OR GET IT FREE VIA TRIALPAY  

PHP Demo Application - Source Code

/Framework/Model/Vendor/CkEditor/_source/plugins/list/plugin.js



/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
 * @file Insert and remove numbered and bulleted lists.
 */
(function()
{
	    var listNodeNames = { ol 1ul 1
		},
	        emptyTextRegex = /^[\n\r\]*$/;
	    CKEDITOR.plugins.list = {
		        /*
		         * Convert a DOM list tree into a data structure that is easier to
		         * manipulate. This operation should be non-intrusive in the sense that it
		         * does not change the DOM tree, with the exception that it may add some
		         * markers to the list item nodes when database is specified.
		         */
		        listToArray : function( listNodedatabasebaseArraybaseIndentLevelgrandparentNode )
		        {
			            if ( !listNodeNameslistNode.getName() ] )
			                return [];
			            if ( !baseIndentLevel )
			                baseIndentLevel 0;
			            if ( !baseArray )
			                baseArray [];
			            // Iterate over all list items to and look for inner lists.
			            for ( var 0count listNode.getChildCount() ;
			 count ;
			 i++ )
			            {
				                var listItem listNode.getChild);
				                // It may be a text node or some funny stuff.
				                if ( listItem.$.nodeName.toLowerCase() != 'li' )
				                    continue;
				                var itemObj = { 'parent' listNodeindent baseIndentLevelelement listItemcontents []
					};
				                if ( !grandparentNode )
				                {
					                    itemObj.grandparent listNode.getParent();
					                    if ( itemObj.grandparent && itemObj.grandparent.$.nodeName.toLowerCase() == 'li' )
					                        itemObj.grandparent itemObj.grandparent.getParent();
					                }
				                else
				                    itemObj.grandparent grandparentNode;
				                if ( database )
				                    CKEDITOR.dom.element.setMarkerdatabaselistItem'listarray_index'baseArray.length );
				                baseArray.pushitemObj );
				                for ( var 0itemChildCount listItem.getChildCount(), child;
				 itemChildCount ;
				 j++ )
				                {
					                    child listItem.getChild);
					                    if ( child.type == CKEDITOR.NODE_ELEMENT && listNodeNameschild.getName() ] )
					                        // Note the recursion here, it pushes inner list items with
					                        // +1 indentation in the correct order.
					                        CKEDITOR.plugins.list.listToArraychilddatabasebaseArraybaseIndentLevel 1itemObj.grandparent );
					                    else
					                        itemObj.contents.pushchild );
					                }
				            }
			            return baseArray;
			        },
		        // Convert our internal representation of a list back to a DOM forest.
		        arrayToList : function( listArraydatabasebaseIndexparagraphModedir )
		        {
			            if ( !baseIndex )
			                baseIndex 0;
			            if ( !listArray || listArray.length baseIndex )
			                return null;
			            var doc listArraybaseIndex ].parent.getDocument(),
			                retval = new CKEDITOR.dom.documentFragmentdoc ),
			                rootNode null,
			                currentIndex baseIndex,
			                indentLevel Math.maxlistArraybaseIndex ].indent),
			                currentListItem null,
			                paragraphName = ( paragraphMode == CKEDITOR.ENTER_P 'p' 'div' );
			            while ( true )
			            {
				                var item listArraycurrentIndex ];
				                if ( item.indent == indentLevel )
				                {
					                    if ( !rootNode || listArraycurrentIndex ].parent.getName() != rootNode.getName() )
					                    {
						                        rootNode listArraycurrentIndex ].parent.clone( falsetrue );
						                        retval.appendrootNode );
						                    }
					                    currentListItem rootNode.appenditem.element.clone( falsetrue ) );
					                    for ( var ;
					 item.contents.length ;
					 i++ )
					                        currentListItem.appenditem.contents[i].clone( truetrue ) );
					                    currentIndex++;
					                }
				                else if ( item.indent == Math.maxindentLevel) + )
				                {
					                    var listData CKEDITOR.plugins.list.arrayToListlistArraynullcurrentIndexparagraphMode );
					                    currentListItem.appendlistData.listNode );
					                    currentIndex listData.nextIndex;
					                }
				                else if ( item.indent == -&& !baseIndex && item.grandparent )
				                {
					                    currentListItem;
					                    if ( listNodeNamesitem.grandparent.getName() ] )
					                        currentListItem item.element.clone( falsetrue );
					                    else
					                    {
						                        // Create completely new blocks here, attributes are dropped.
						                        if ( dir || ( paragraphMode != CKEDITOR.ENTER_BR && item.grandparent.getName() != 'td' ) )
						                        {
							                            currentListItem doc.createElementparagraphName );
							                            if ( dir )
							                                currentListItem.setAttribute'dir'dir );
							                        }
						                        else
						                            currentListItem = new CKEDITOR.dom.documentFragmentdoc );
						                    }
					                    for ( ;
					 item.contents.length ;
					 i++ )
					                        currentListItem.appenditem.contents[i].clone( truetrue ) );
					                    if ( currentListItem.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT
					                         && currentIndex != listArray.length )
					                    {
						                        if ( currentListItem.getLast()
						                                && currentListItem.getLast().type == CKEDITOR.NODE_ELEMENT
						                                && currentListItem.getLast().getAttribute'type' ) == '_moz' )
						                            currentListItem.getLast().remove();
						                        currentListItem.appendBogus();
						                    }
					                    if ( currentListItem.type == CKEDITOR.NODE_ELEMENT &&
					                            currentListItem.getName() == paragraphName &&
					                            currentListItem.$.firstChild )
					                    {
						                        currentListItem.trim();
						                        var firstChild currentListItem.getFirst();
						                        if ( firstChild.type == CKEDITOR.NODE_ELEMENT && firstChild.isBlockBoundary() )
						                        {
							                            var tmp = new CKEDITOR.dom.documentFragmentdoc );
							                            currentListItem.moveChildrentmp );
							                            currentListItem tmp;
							                        }
						                    }
					                    var currentListItemName currentListItem.$.nodeName.toLowerCase();
					                    if ( !CKEDITOR.env.ie && ( currentListItemName == 'div' || currentListItemName == 'p' ) )
					                        currentListItem.appendBogus();
					                    retval.appendcurrentListItem );
					                    rootNode null;
					                    currentIndex++;
					                }
				                else
				                    return null;
				                if ( listArray.length <= currentIndex || Math.maxlistArraycurrentIndex ].indent) < indentLevel )
				                    break;
				            }
			            // Clear marker attributes for the new list tree made of cloned nodes, if any.
			            if ( database )
			            {
				                var currentNode retval.getFirst();
				                while ( currentNode )
				                {
					                    if ( currentNode.type == CKEDITOR.NODE_ELEMENT )
					                        CKEDITOR.dom.element.clearMarkersdatabasecurrentNode );
					                    currentNode currentNode.getNextSourceNode();
					                }
				            }
			            return { listNode retvalnextIndex currentIndex
				};
			        }
		    };
	    function setStateeditorstate )
	    {
		        editor.getCommandthis.name ).setStatestate );
		    }
	    function onSelectionChangeevt )
	    {
		        var path evt.data.path,
		            blockLimit path.blockLimit,
		            elements path.elements,
		            element;
		        // Grouping should only happen under blockLimit.(#3940).
		        for ( var ;
		 elements.length && ( element elements] )
		              && !element.equalsblockLimit );
		 i++ )
		        {
			            if ( listNodeNameselements[i].getName() ] )
			            {
				                return setState.callthisevt.editor,
				                        this.type == elements[i].getName() ? CKEDITOR.TRISTATE_ON CKEDITOR.TRISTATE_OFF );
				            }
			        }
		        return setState.callthisevt.editorCKEDITOR.TRISTATE_OFF );
		    }
	    function changeListTypeeditorgroupObjdatabaselistsCreated )
	    {
		        // This case is easy...
		        // 1. Convert the whole list into a one-dimensional array.
		        // 2. Change the list type by modifying the array.
		        // 3. Recreate the whole list by converting the array to a list.
		        // 4. Replace the original list with the recreated list.
		        var listArray CKEDITOR.plugins.list.listToArraygroupObj.rootdatabase ),
		            selectedListItems [];
		        for ( var ;
		 groupObj.contents.length ;
		 i++ )
		        {
			            var itemNode groupObj.contents[i];
			            itemNode itemNode.getAscendant'li'true );
			            if ( !itemNode || itemNode.getCustomData'list_item_processed' ) )
			                continue;
			            selectedListItems.pushitemNode );
			            CKEDITOR.dom.element.setMarkerdatabaseitemNode'list_item_processed'true );
			        }
		        var root groupObj.root,
		            fakeParent root.getDocument().createElementthis.type );
		        // Copy all attributes, except from 'start' and 'type'.
		        root.copyAttributesfakeParent, { start 1type 1
			} );
		        // The list-style-type property should be ignored.
		        fakeParent.removeStyle'list-style-type' );
		        for ( ;
		 selectedListItems.length ;
		 i++ )
		        {
			            var listIndex selectedListItems[i].getCustomData'listarray_index' );
			            listArray[listIndex].parent fakeParent;
			        }
		        var newList CKEDITOR.plugins.list.arrayToListlistArraydatabasenulleditor.config.enterMode );
		        var childlength newList.listNode.getChildCount();
		        for ( ;
		 length && ( child newList.listNode.getChild) ) ;
		 i++ )
		        {
			            if ( child.getName() == this.type )
			                listsCreated.pushchild );
			        }
		        newList.listNode.replacegroupObj.root );
		    }
	    var headerTagRegex = /^h[1-6]$/;
	    function createListeditorgroupObjlistsCreated )
	    {
		        var contents groupObj.contents,
		            doc groupObj.root.getDocument(),
		            listContents [];
		        // It is possible to have the contents returned by DomRangeIterator to be the same as the root.
		        // e.g. when we're running into table cells.
		        // In such a case, enclose the childNodes of contents[0] into a <div>.
		        if ( contents.length == && contents[0].equalsgroupObj.root ) )
		        {
			            var divBlock doc.createElement'div' );
			            contents[0].moveChildren && contents[0].moveChildrendivBlock );
			            contents[0].appenddivBlock );
			            contents[0] = divBlock;
			        }
		        // Calculate the common parent node of all content blocks.
		        var commonParent groupObj.contents[0].getParent();
		        for ( var ;
		 contents.length ;
		 i++ )
		            commonParent commonParent.getCommonAncestorcontents[i].getParent() );
		        // We want to insert things that are in the same tree level only, so calculate the contents again
		        // by expanding the selected blocks to the same tree level.
		        for ( ;
		 contents.length ;
		 i++ )
		        {
			            var contentNode contents[i],
			                parentNode;
			            while ( ( parentNode contentNode.getParent() ) )
			            {
				                if ( parentNode.equalscommonParent ) )
				                {
					                    listContents.pushcontentNode );
					                    break;
					                }
				                contentNode parentNode;
				            }
			        }
		        if ( listContents.length )
		            return;
		        // Insert the list to the DOM tree.
		        var insertAnchor listContentslistContents.length ].getNext(),
		            listNode doc.createElementthis.type ),
		            dir;
		        listsCreated.pushlistNode );
		        while ( listContents.length )
		        {
			            var contentBlock listContents.shift(),
			                listItem doc.createElement'li' );
			            // Preserve preformat block and heading structure when converting to list item. (#5335) (#5271)
			            if ( contentBlock.is'pre' ) || headerTagRegex.testcontentBlock.getName() ) )
			                contentBlock.appendTolistItem );
			            else
			            {
				                if ( contentBlock.hasAttribute'dir' ) )
				                {
					                    dir dir || contentBlock.getAttribute'dir' );
					                    contentBlock.removeAttribute'dir' );
					                }
				                contentBlock.copyAttributeslistItem );
				                contentBlock.moveChildrenlistItem );
				                contentBlock.remove();
				                // Append a bogus BR to force the LI to render at full height
				                if ( !CKEDITOR.env.ie )
				                    listItem.appendBogus();
				            }
			            listItem.appendTolistNode );
			        }
		        if ( dir )
		            listNode.setAttribute'dir'dir );
		        if ( insertAnchor )
		            listNode.insertBeforeinsertAnchor );
		        else
		            listNode.appendTocommonParent );
		    }
	    function removeListeditorgroupObjdatabase )
	    {
		        // This is very much like the change list type operation.
		        // Except that we're changing the selected items' indent to -1 in the list array.
		        var listArray CKEDITOR.plugins.list.listToArraygroupObj.rootdatabase ),
		            selectedListItems [];
		        for ( var ;
		 groupObj.contents.length ;
		 i++ )
		        {
			            var itemNode groupObj.contents[i];
			            itemNode itemNode.getAscendant'li'true );
			            if ( !itemNode || itemNode.getCustomData'list_item_processed' ) )
			                continue;
			            selectedListItems.pushitemNode );
			            CKEDITOR.dom.element.setMarkerdatabaseitemNode'list_item_processed'true );
			        }
		        var lastListIndex null;
		        for ( ;
		 selectedListItems.length ;
		 i++ )
		        {
			            var listIndex selectedListItems[i].getCustomData'listarray_index' );
			            listArray[listIndex].indent = -1;
			            lastListIndex listIndex;
			        }
		        // After cutting parts of the list out with indent=-1, we still have to maintain the array list
		        // model's nextItem.indent <= currentItem.indent + 1 invariant. Otherwise the array model of the
		        // list cannot be converted back to a real DOM list.
		        for ( lastListIndex ;
		 listArray.length ;
		 i++ )
		        {
			            if ( listArray[i].indent listArray[i-1].indent )
			            {
				                var indentOffset listArray[i-1].indent listArray[i].indent;
				                var oldIndent listArray[i].indent;
				                while ( listArray[i] && listArray[i].indent >= oldIndent )
				                {
					                    listArray[i].indent += indentOffset;
					                    i++;
					                }
				                i--;
				            }
			        }
		        var newList CKEDITOR.plugins.list.arrayToListlistArraydatabasenulleditor.config.enterMode,
		            groupObj.root.getAttribute'dir' ) );
		        // Compensate <br> before/after the list node if the surrounds are non-blocks.(#3836)
		        var docFragment newList.listNodeboundaryNodesiblingNode;
		        function compensateBrsisStart )
		        {
			            if ( ( boundaryNode docFragmentisStart 'getFirst' 'getLast' ]() )
			                 && !( boundaryNode.is && boundaryNode.isBlockBoundary() )
			                 && ( siblingNode groupObj.rootisStart 'getPrevious' 'getNext' ]
			                      ( CKEDITOR.dom.walker.whitespacestrue ) ) )
			                 && !( siblingNode.is && siblingNode.isBlockBoundary( { br 1
				} ) ) )
			                editor.document.createElement'br' )[ isStart 'insertBefore' 'insertAfter' ]( boundaryNode );
			        }
		        compensateBrstrue );
		        compensateBrs();
		        docFragment.replacegroupObj.root );
		    }
	    function listCommandnametype )
	    {
		        this.name name;
		        this.type type;
		    }
	    listCommand.prototype = {
		        exec : function( editor )
		        {
			            editor.focus();
			            var doc editor.document,
			                selection editor.getSelection(),
			                ranges selection && selection.getRangestrue );
			            // There should be at least one selected range.
			            if ( !ranges || ranges.length )
			                return;
			            // Midas lists rule #1 says we can create a list even in an empty document.
			            // But DOM iterator wouldn't run if the document is really empty.
			            // So create a paragraph if the document is empty and we're going to create a list.
			            if ( this.state == CKEDITOR.TRISTATE_OFF )
			            {
				                var body doc.getBody();
				                body.trim();
				                if ( !body.getFirst() )
				                {
					                    var paragraph doc.createElementeditor.config.enterMode == CKEDITOR.ENTER_P 'p' :
					                            ( editor.config.enterMode == CKEDITOR.ENTER_DIV 'div' 'br' ) );
					                    paragraph.appendTobody );
					                    ranges = new CKEDITOR.dom.rangeList( [ new CKEDITOR.dom.rangedoc ) ] );
					                    // IE exception on inserting anything when anchor inside <br>.
					                    if ( paragraph.is'br' ) )
					                    {
						                        ranges].setStartBeforeparagraph );
						                        ranges].setEndAfterparagraph );
						                    }
					                    else
					                        ranges].selectNodeContentsparagraph );
					                    selection.selectRangesranges );
					                }
				                // Maybe a single range there enclosing the whole list,
				                // turn on the list state manually(#4129).
				                else
				                {
					                    var range ranges.length == && ranges],
					                        enclosedNode range && range.getEnclosedNode();
					                    if ( enclosedNode && enclosedNode.is
					                        && this.type == enclosedNode.getName() )
					                    {
						                        setState.callthiseditorCKEDITOR.TRISTATE_ON );
						                    }
					                }
				            }
			            var bookmarks selection.createBookmarkstrue );
			            // Group the blocks up because there are many cases where multiple lists have to be created,
			            // or multiple lists have to be cancelled.
			            var listGroups [],
			                database {},
			                rangeIterator ranges.createIterator(),
			                index 0;
			            while ( ( range rangeIterator.getNextRange() ) && ++index )
			            {
				                var boundaryNodes range.getBoundaryNodes(),
				                    startNode boundaryNodes.startNode,
				                    endNode boundaryNodes.endNode;
				                if ( startNode.type == CKEDITOR.NODE_ELEMENT && startNode.getName() == 'td' )
				                    range.setStartAtboundaryNodes.startNodeCKEDITOR.POSITION_AFTER_START );
				                if ( endNode.type == CKEDITOR.NODE_ELEMENT && endNode.getName() == 'td' )
				                    range.setEndAtboundaryNodes.endNodeCKEDITOR.POSITION_BEFORE_END );
				                var iterator range.createIterator(),
				                    block;
				                iterator.forceBrBreak = ( this.state == CKEDITOR.TRISTATE_OFF );
				                while ( ( block iterator.getNextParagraph() ) )
				                {
					                    // Avoid duplicate blocks get processed across ranges.
					                    if( block.getCustomData'list_block' ) )
					                        continue;
					                    else
					                        CKEDITOR.dom.element.setMarkerdatabaseblock'list_block');
					                    var path = new CKEDITOR.dom.elementPathblock ),
					                        pathElements path.elements,
					                        pathElementsCount pathElements.length,
					                        listNode null,
					                        processedFlag false,
					                        blockLimit path.blockLimit,
					                        element;
					                    // First, try to group by a list ancestor.
					                    for ( var pathElementsCount 1;
					 >= && ( element pathElements] );
					 i-- )
					                    {
						                        if ( listNodeNameselement.getName() ]
						                             && blockLimit.containselement ) )     // Don't leak outside block limit (#3940).
						                        {
							                            // If we've encountered a list inside a block limit
							                            // The last group object of the block limit element should
							                            // no longer be valid. Since paragraphs after the list
							                            // should belong to a different group of paragraphs before
							                            // the list. (Bug #1309)
							                            blockLimit.removeCustomData'list_group_object_' index );
							                            var groupObj element.getCustomData'list_group_object' );
							                            if ( groupObj )
							                                groupObj.contents.pushblock );
							                            else
							                            {
								                                groupObj = { root elementcontents : [ block ]
									};
								                                listGroups.pushgroupObj );
								                                CKEDITOR.dom.element.setMarkerdatabaseelement'list_group_object'groupObj );
								                            }
							                            processedFlag true;
							                            break;
							                        }
						                    }
					                    if ( processedFlag )
					                        continue;
					                    // No list ancestor? Group by block limit, but don't mix contents from different ranges.
					                    var root blockLimit;
					                    if ( root.getCustomData'list_group_object_' index ) )
					                        root.getCustomData'list_group_object_' index ).contents.pushblock );
					                    else
					                    {
						                        groupObj = { root rootcontents : [ block ]
							};
						                        CKEDITOR.dom.element.setMarkerdatabaseroot'list_group_object_' indexgroupObj );
						                        listGroups.pushgroupObj );
						                    }
					                }
				            }
			            // Now we have two kinds of list groups, groups rooted at a list, and groups rooted at a block limit element.
			            // We either have to build lists or remove lists, for removing a list does not makes sense when we are looking
			            // at the group that's not rooted at lists. So we have three cases to handle.
			            var listsCreated [];
			            while ( listGroups.length )
			            {
				                groupObj listGroups.shift();
				                if ( this.state == CKEDITOR.TRISTATE_OFF )
				                {
					                    if ( listNodeNamesgroupObj.root.getName() ] )
					                        changeListType.callthiseditorgroupObjdatabaselistsCreated );
					                    else
					                        createList.callthiseditorgroupObjlistsCreated );
					                }
				                else if ( this.state == CKEDITOR.TRISTATE_ON && listNodeNamesgroupObj.root.getName() ] )
				                    removeList.callthiseditorgroupObjdatabase );
				            }
			            // For all new lists created, merge adjacent, same type lists.
			            for ( ;
			 listsCreated.length ;
			 i++ )
			            {
				                listNode listsCreated[i];
				                var mergeSiblinglistCommand this;
				                ( mergeSibling = function( rtl ){
					                    var sibling listNodertl ?
					                        'getPrevious' 'getNext' ]( CKEDITOR.dom.walker.whitespacestrue ) );
					                    if ( sibling && sibling.getName &&
					                         sibling.getName() == listCommand.type )
					                    {
						                        sibling.remove();
						                        // Move children order by merge direction.(#3820)
						                        sibling.moveChildrenlistNodertl true false );
						                    }
					                } )();
				                mergeSiblingtrue );
				            }
			            // Clean up, restore selection and update toolbar button states.
			            CKEDITOR.dom.element.clearAllMarkersdatabase );
			            selection.selectBookmarksbookmarks );
			            editor.focus();
			        }
		    };
	    var dtd CKEDITOR.dtd;
	    var tailNbspRegex = /[\t\r\]*(?:&nbsp;
	|\xa0)$/;
	    function indexOfFirstChildElementelementtagNameList )
	    {
		        var child,
		            children element.children,
		            length children.length;
		        for ( var ;
		 length ;
		 i++ )
		        {
			            child children];
			            if ( child.name && ( child.name in tagNameList ) )
			                return i;
			        }
		        return length;
		    }
	    function getExtendNestedListFilterisHtmlFilter )
	    {
		        // An element filter function that corrects nested list start in an empty
		        // list item for better displaying/outputting. (#3165)
		        return function( listItem )
		        {
			            var children listItem.children,
			                firstNestedListIndex indexOfFirstChildElementlistItemdtd.$list ),
			                firstNestedList childrenfirstNestedListIndex ],
			                nodeBefore firstNestedList && firstNestedList.previous,
			                tailNbspmatch;
			            if ( nodeBefore
			                && ( nodeBefore.name && nodeBefore.name == 'br'
			                    || nodeBefore.value && ( tailNbspmatch nodeBefore.value.matchtailNbspRegex ) ) ) )
			            {
				                var fillerNode nodeBefore;
				                // Always use 'nbsp' as filler node if we found a nested list appear
				                // in front of a list item.
				                if ( !( tailNbspmatch && tailNbspmatch.index ) && fillerNode == children] )
				                    children] = ( isHtmlFilter || CKEDITOR.env.ie ) ?
				                                     new CKEDITOR.htmlParser.text'\xa0' ) :
				                                     new CKEDITOR.htmlParser.element'br'{} );
				                // Otherwise the filler is not needed anymore.
				                else if ( fillerNode.name == 'br' )
				                    children.splicefirstNestedListIndex 1);
				                else
				                    fillerNode.value fillerNode.value.replacetailNbspRegex'' );
				            }
			        };
		    }
	    var defaultListDataFilterRules = { elements {}
		};
	    for ( var i in dtd.$listItem )
	        defaultListDataFilterRules.elements] = getExtendNestedListFilter();
	    var defaultListHtmlFilterRules = { elements {}
		};
	    for ( i in dtd.$listItem )
	        defaultListHtmlFilterRules.elements] = getExtendNestedListFiltertrue );
	    CKEDITOR.plugins.add'list',
	    {
		        init : function( editor )
		        {
			            // Register commands.
			            var numberedListCommand = new listCommand'numberedlist''ol' ),
			                bulletedListCommand = new listCommand'bulletedlist''ul' );
			            editor.addCommand'numberedlist'numberedListCommand );
			            editor.addCommand'bulletedlist'bulletedListCommand );
			            // Register the toolbar button.
			            editor.ui.addButton'NumberedList',
			                {
				                    label editor.lang.numberedlist,
				                    command 'numberedlist'
				                } );
			            editor.ui.addButton'BulletedList',
			                {
				                    label editor.lang.bulletedlist,
				                    command 'bulletedlist'
				                } );
			            // Register the state changing handlers.
			            editor.on'selectionChange'CKEDITOR.tools.bindonSelectionChangenumberedListCommand ) );
			            editor.on'selectionChange'CKEDITOR.tools.bindonSelectionChangebulletedListCommand ) );
			        },
		        afterInit : function ( editor )
		        {
			            var dataProcessor editor.dataProcessor;
			            if ( dataProcessor )
			            {
				                dataProcessor.dataFilter.addRulesdefaultListDataFilterRules );
				                dataProcessor.htmlFilter.addRulesdefaultListHtmlFilterRules );
				            }
			        },
		        requires : [ 'domiterator' ]
		    } );
	})();





PHP Demo Source Code Index