复制代码代码如下 :
<input type = "button"onclick = "cleanword ();" 값 = "단어 清理" />
cleanword = function () {
var editbody = fckeditorapi.getinstance ( "text"). editordocument.body;
var html = fckeditorapi.getinstance ( "text"). editordocument.body.innertext;
for (var intloop = 0; intloop <editbody.all.length; intloop ++) {
el = editbody.all [intloop];
el.removeattribute ( "classname", "", 0);
el.removeattribute ( "스타일", "", 0);
el.removeattribute ( "font", "", 0);
}
html = html.replace (/<o : p> <// o : p>/g, "");
html = html.replace (/o :/g, "");
html = html.replace (/<font>/g, "");
html = html.replace (/<font>/g, "");
html = html.replace (/<span/g, "");
html = html.replace (/<span/g, "");
html = html.replace (/<spanlang = en-us>/g, "");
html = html.replace (/<p>/g, "");
html = html.replace (/<// p>/g, "");
html = html.replace (// span>/g, "");
fckeditorapi.getinstance ( "text"). editordocument.body.innertext = html;
}