KISSY.Editor.add("sourcearea",function(c){c.addPlugin("sourcearea",function(){function f(){var a=c.textarea;a.on("keydown",function(b){if(b.ctrlKey&&b.keyCode==87){b.halt();b=a.attr("wrap")=="off"?"soft":"off";if(g.ie)a.attr("wrap",b);else{a.detach();var d=a._4e_clone();c.textarea=d;d.attr("wrap",b);d.val(a.val());a[0].parentNode.replaceChild(d[0],a[0]);f();a=null}}})}var h=KISSY,e=h.Editor,g=h.UA;if(!(g.gecko<1.92)){var j=e.SOURCE_MODE,k=e.WYSIWYG_MODE,i=c.addButton("sourcearea",{title:"\u6e90\u7801",contentCls:"ke-toolbar-source",
loading:true});e.use("sourcearea/support",function(){i.reload({init:function(){var a=this.btn,b=this.editor;b.on("wysiwygmode",a.boff,a);b.on("sourcemode",a.bon,a)},offClick:function(){this.editor.execCommand("sourceAreaSupport",j)},onClick:function(){this.editor.execCommand("sourceAreaSupport",k)}});c.addCommand("sourceAreaSupport",e.SourceAreaSupport)});this.destroy=function(){i.destroy()};f()}})},{attach:false});