js清理Word格式示例代码_javascript技巧
程序员文章站
2022-05-07 08:58:43
...
复制代码 代码如下:
cleanWord = function(){
var editBody = FCKeditorAPI.GetInstance("text").EditorDocument.body;
var html = FCKeditorAPI.GetInstance("text").EditorDocument.body.innerText;
for(var intLoop=0;intLoop
el.removeAttribute("className","",0);
el.removeAttribute("style","",0);
el.removeAttribute("font"," ",0);
}
html=html.replace(/
/g,""); /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(/
html=html.replace(/
html=html.replace(//g,"");
html=html.replace(//g,"");
FCKeditorAPI.GetInstance("text").EditorDocument.body.innerText=html;
}
推荐阅读
-
js取消单选按钮选中示例代码_javascript技巧
-
js取消单选按钮选中示例代码_javascript技巧
-
Js实现双击鼠标自动滚动屏幕的示例代码_javascript技巧
-
js禁止回车提交表单的示例代码_javascript技巧
-
JS 实现Table相同行的单元格自动合并示例代码_javascript技巧
-
js禁止回车提交表单的示例代码_javascript技巧
-
js获取url中指定参数值的示例代码_javascript技巧
-
JS 实现Table相同行的单元格自动合并示例代码_javascript技巧
-
JS 事件冒泡 示例代码_javascript技巧
-
js为数字添加逗号并格式化数字的代码_javascript技巧