2011-11-23 149 views
1

我正在使用jQuery和tinymce并启用粘贴插件从Word文档复制粘贴内容。TinyMce粘贴插件word内容粘贴不能在IE中工作

但粘贴内容和做一些格式化后,这个保存的文本在IE中显示不好。

似乎tinymce添加了下面的html代码,删除它与IE的效果很好。

<p> 
<!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:PunctuationKerning /> <w:ValidateAgainstSchemas /> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:Compatibility> <w:BreakWrappedTables /> <w:SnapToGridInCell /> <w:WrapTextWithPunct /> <w:UseAsianBreakRules /> <w:DontGrowAutofit /> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--> 
<!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]--> 
<!--[if gte mso 10]> <mce:style><! /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal";  mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt;  mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400;  mso-bidi-language:#0400;} --> <!--[endif] --> 
</p> 

所以我的问题是 - 我可以配置tinymce以某种方式不添加上面的行。

回答

0

你可以试试下面的TinyMCE的初始化参数

paste_strip_class_attributes : "all", 
    paste_remove_styles: true, 
    paste_convert_middot_lists: false,