This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
KindEditor.plugin('clearstyle', function(K) {
var self = this, name = 'clearstyle';
self.clickToolbar(name, function() {
var $kecontent=$("iframe.ke-edit-iframe").contents().find(".ke-content");
$kecontent.find('span').removeAttr('style');
$kecontent.find('strong,span,h2,em').each(function() {
var texts=$(this).text(); //其他标签如div、li、p等不能用text(),得用html()
texts=texts.replace(/\ +/g,"");//去掉空格
texts=texts.replace(/[ ]/g,"");//去掉空格
texts=texts.replace(/[\r\n]/g,"");//去掉回车换行
if (texts=='') {
$(this).remove();
};
});
alert('清除完毕');