js清理word格式示例代码
复制代码代码如下所示:cleanword =函数(){
无功editbody = fckeditorapi.getinstance(文本)。EditorDocument.body;
VaR的HTML = fckeditorapi.getinstance(文本)。EditorDocument.body.innerText;
对于(VAR日本盈联= 0;日本盈联< editbody.all.length;日本盈联+ +){
EL = editbody,{日本盈联};
el.removeattribute(名
el.removeattribute(风格
el.removeattribute(字体
}
HTML = html.replace( / / g,);
HTML = html.replace( / O: / g,);
HTML = html.replace( / / g,);
HTML = html.replace( / / g,);
HTML = html.replace( / / g,);
HTML = html.replace( / / g,);
HTML = html.replace( / / g,);
HTML = html.replace( / / g,);
HTML = html.replace( / / g,);
HTML = html.replace( / / g,);
fckeditorapi.getinstance(文本)。editordocument。体innerText = HTML;
}