fck编辑器从word粘贴过来的文字中会有一写多余的html代码,请问如何清除红色部分.
<p><!--[if gte mso 9]><xml><w:WordDocument><w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel><w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery><w:DisplayVerticalDrawingGridEvery>2</w:DisplayVerticalDrawingGridEvery><w:DocumentKind>DocumentNotSpecified</w:DocumentKind><w:DrawingGridVerticalSpacing>7.8</w:DrawingGridVerticalSpacing><w:View>Normal</w:View><w:Compatibility></w:Compatibility><w:Zoom>0</w:Zoom></w:WordDocument></xml><![endif]--></p>
<div style="margin-bottom: 0pt; margin-top: 0pt;"><span style="font-weight: bold; font-size: 10.5pt; font-family: 'Times New Roman';">阿噶巴<font face="Times New Roman">•</font><font face="宋体">洛桑仁波切</font></span><span style="font-size: 10.5pt; font-family: 'Times New Roman';">是虹化大成就者霍哇仲冉巴<font face="Times New Roman">•</font><font face="宋体">玛旺</font><font face="Times New Roman">•</font><font face="宋体">庚噶让卓尔仁波切的转世。</font><font face="Times New Roman">1980</font><font face="宋体">年</font><font face="Times New Roman">10</font><font face="宋体">月出生于辽阔的安多</font></span><span style="font-size: 10.5pt; font-family: 'Times New Roman';"><br />
</span></div>
<p class="p0" style="margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 10.5pt; font-family: 'Times New Roman';"> </span></p>
firefox工具条里有"PasteWord"和"RemoveFormat"API
我也觉得挺烦的,从word excel复制粘贴到fck里总会生成些垃圾代码。在获取编辑器里的内容时,我都是用正则表达式去匹配删除那些无用代码的。