KISSY.Editor.add("table",function(c){c.addPlugin("table",function(){var d=KISSY,f=d.Editor,j=d.trim;d=(d.UA.ie===6?["table.%2,","table.%2 td, table.%2 th,","{","border : #d3d3d3 1px dotted","}"]:[" table.%2,"," table.%2 > tr > td,  table.%2 > tr > th,"," table.%2 > tbody > tr > td,  table.%2 > tbody > tr > th,"," table.%2 > thead > tr > td,  table.%2 > thead > tr > th,"," table.%2 > tfoot > tr > td,  table.%2 > tfoot > tr > th","{","border : #d3d3d3 1px dotted","}"]).join("").replace(/%2/g,"ke_show_border");
var b=c.htmlDataProcessor,g=b&&b.dataFilter;b=b&&b.htmlFilter;g&&g.addRules({elements:{table:function(a){a=a.attributes;var e=a["class"],h=parseInt(a.border,10);if(!h||h<=0)a["class"]=(e||"")+" ke_show_border"}}});b&&b.addRules({elements:{table:function(a){a=a.attributes;var e=a["class"];if(e)a["class"]=j(e.replace("ke_show_border","").replace(/\s{2}/," "))}}});var i=c.addButton("table",{contentCls:"ke-toolbar-table",mode:f.WYSIWYG_MODE,title:"\u63d2\u5165\u8868\u683c",loading:true});f.use("table/support",function(){var a=
new f.TableUI(c);i.reload({offClick:function(){a._tableShow()},destroy:function(){a.destroy()}})});this.destroy=function(){i.destroy()};c.addCustomStyle(d)})},{attach:false});
