editor-lists-min.js revision 5cbdc947eb0c9c5e840d59ff8e1dd49a0e2a1887
YUI.add("editor-lists",function(F){var E=function(){E.superclass.constructor.apply(this,arguments);},B="li",C="ol",D="ul",A="host";F.extend(E,F.Base,{_onNodeChange:function(K){var J=this.get(A).getInstance(),G,N,O,H,I,L,M=false,P;if(F.UA.ie&&K.changedType==="enter"){if(K.changedNode.test(B+", "+B+" *")){K.changedEvent.halt();K.preventDefault();N=K.changedNode;O=J.Node.create("<"+B+">"+E.NON+"</"+B+">");if(!N.test(B)){N=N.ancestor(B);}N.insert(O,"after");G=new J.Selection();G.selectNode(O.get("firstChild"));}}if(K.changedType==="tab"){if(K.changedNode.test(B+", "+B+" *")){K.changedEvent.halt();K.preventDefault();N=K.changedNode;I=K.changedEvent.shiftKey;L=N.ancestor(C+","+D);P=D;if(L.get("tagName").toLowerCase()===C){P=C;}if(!N.test(B)){N=N.ancestor(B);}if(I){if(N.ancestor(B)){N.ancestor(B).insert(N,"after");M=true;}}else{if(N.previous(B)){H=J.Node.create("<"+P+"></"+P+">");N.previous(B).append(H);H.append(N);M=true;}}}if(M){N.all(E.REMOVE).remove();if(F.UA.ie){N=N.append(E.NON).one(E.NON_SEL);}(new J.Selection()).selectNode(N,true,true);}}},initializer:function(){this.get(A).on("nodeChange",F.bind(this._onNodeChange,this));}},{NON:'<span class="yui-non">&nbsp;</span>',NON_SEL:"span.yui-non",REMOVE:"br",NAME:"editorLists",NS:"lists",ATTRS:{host:{value:false}}});F.namespace("Plugin");F.Plugin.EditorLists=E;F.mix(F.Plugin.ExecCommand.COMMANDS,{insertunorderedlist:function(I){var H=this.get("host").getInstance(),G;this.get("host")._execCommand(I,"");G=(new H.Selection()).getSelected();return G;},insertorderedlist:function(I){var H=this.get("host").getInstance(),G;this.get("host")._execCommand(I,"");G=(new H.Selection()).getSelected();return G;}});},"@VERSION@",{requires:["editor-base"],skinnable:false});