2011-11-23 92 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,