KISSY.Editor.add("checkbox-sourcearea/support",function(){function e(a){this.editor=a;this._init()}var c=KISSY,b=c.Editor,f=c.Node,g=b.SOURCE_MODE,h=b.WYSIWYG_MODE;c.augment(e,{_init:function(){var a=this.editor,i=a.statusDiv;this.holder=(new f("<span style='zoom:1;display:inline-block;height:22px;line-height:22px;'><input style='margin:0 5px;vertical-align:middle;' type='checkbox' /><span style='vertical-align:middle;'>\u7f16\u8f91\u6e90\u4ee3\u7801</span></span>")).appendTo(i);var d=this.el=this.holder.one("input");d.on("click",
this._check,this);a.on("sourcemode",function(){d[0].checked=true});a.on("wysiwygmode",function(){d[0].checked=false})},_check:function(a){this.el[0].checked?this._show():this._hide();a&&a.stopPropagation()},_show:function(){b.SourceAreaSupport.exec(this.editor,g)},_hide:function(){b.SourceAreaSupport.exec(this.editor,h)},destroy:function(){this.el.detach();this.holder.remove()}});b.CheckboxSourceArea=e},{attach:false,requires:["sourcearea/support"]});
