YUI.add("editor-br",function(a,e){var t=function(){t.superclass.constructor.apply(this,arguments)},i="host",r="li";a.extend(t,a.Base,{_onKeyDown:function(e){var t,n,o;e.stopped?e.halt():13===e.keyCode&&(o=new(n=(t=this.get(i)).getInstance()).EditorSelection)&&(!a.UA.ie||o.anchorNode&&(o.anchorNode.test(r)||o.anchorNode.ancestor(r))||(t.execCommand("inserthtml",n.EditorSelection.CURSOR),e.halt()),!a.UA.webkit||o.anchorNode&&(o.anchorNode.test(r)||o.anchorNode.ancestor(r))||(t.frame._execCommand("insertlinebreak",null),e.halt()))},_afterEditorReady:function(){var e,t=this.get(i).getInstance();try{t.config.doc.execCommand("insertbronreturn",null,!0)}catch(n){}(a.UA.ie||a.UA.webkit)&&((e=t.EditorSelection.ROOT).test("body")&&(e=t.config.doc),t.on("keydown",a.bind(this._onKeyDown,this),e))},_onNodeChange:function(e){switch(e.changedType){case"backspace-up":case"backspace-down":case"delete-up":var t=this.get(i).getInstance(),n=e.changedNode,t=t.config.doc.createTextNode(" ");n.appendChild(t),n.removeChild(t)}},initializer:function(){var e=this.get(i);e.editorPara?a.error("Can not plug EditorBR and EditorPara at the same time."):(e.after("ready",a.bind(this._afterEditorReady,this)),a.UA.gecko&&e.on("nodeChange",a.bind(this._onNodeChange,this)))}},{NAME:"editorBR",NS:"editorBR",ATTRS:{host:{value:!1}}}),a.namespace("Plugin"),a.Plugin.EditorBR=t},"patched-v3.18.7",{requires:["editor-base"]});