/*
YUI 3.6.0pr3 (build 1)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("editor-para-base",function(a){var i=function(){i.superclass.constructor.apply(this,arguments);},k="host",e="body",c="nodeChange",j="parentNode",b=e+" > p",g="p",f="<br>",h="firstChild",d="li";a.extend(i,a.Base,{_fixFirstPara:function(){var p=this.get(k),r=p.getInstance(),q,s,l=r.config.doc.body,o=l.innerHTML,m=((o.length)?true:false);if(o===f){o="";m=false;}l.innerHTML="<"+g+">"+o+r.EditorSelection.CURSOR+"</"+g+">";s=r.one(b);q=new r.EditorSelection();q.selectNode(s,true,m);},_afterEditorReady:function(){var m=this.get(k),n=m.getInstance(),l;if(n){n.EditorSelection.filterBlocks();l=n.EditorSelection.DEFAULT_BLOCK_TAG;b=e+" > "+l;g=l;}},_afterContentChange:function(){var l=this.get(k),m=l.getInstance();if(m&&m.EditorSelection){m.EditorSelection.filterBlocks();}},_afterPaste:function(){var l=this.get(k),n=l.getInstance(),m=new n.EditorSelection();a.later(50,l,function(){n.EditorSelection.filterBlocks();});},initializer:function(){var l=this.get(k);if(l.editorBR){a.error("Can not plug EditorPara and EditorBR at the same time.");return;}l.after("ready",a.bind(this._afterEditorReady,this));l.after("contentChange",a.bind(this._afterContentChange,this));if(a.Env.webkit){l.after("dom:paste",a.bind(this._afterPaste,this));}}},{NAME:"editorParaBase",NS:"editorParaBase",ATTRS:{host:{value:false}}});a.namespace("Plugin");a.Plugin.EditorParaBase=i;},"3.6.0pr3",{requires:["editor-base"],skinnable:false});