2013-10-27 62 views
0

因此,我正在使用TinyMCE 3.5.9。除非在IE中調整圖像大小時,效果很好。 TinyMCE不會在寬度和高度標籤上附加樣式標籤。這會導致Internet Explorer 10,9,8等問題。IE需要寬度和高度的樣式標記,否則會被忽略。TinyMCE不會調整IE中的圖像

你如何解決這個問題?有沒有其他人遇到過這個問題?下面是我的插件實現。

任何幫助,非常感謝。

tinyMCE.init({ 
     mode: "textareas", 
     theme: "advanced", 
     editor_selector: "richText", 
     plugins: "paste,table,advimage,advlink,media,directionality,fullscreen,preview", 
     //valid_children: "+head[style],+body[style]", 
     verify_html: false, 
     paste_auto_cleanup_on_paste: true, 
     theme_advanced_buttons1: "outdent,indent,bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,cut,copy,paste,pastetext,|,fontsizeselect", 
     theme_advanced_buttons2: "tablecontrols,link,unlink,image,|,forecolor,backcolor,media,code", 
     theme_advanced_buttons3: "formatselect,fontselect,|,ltr,rtl,|,visualaid,fullscreen,preview", 
     theme_advanced_disable: ",help,hr,removeformat,sub,sup,backcolorpicker,charmap,anchor,newdocument", 
     theme_advanced_toolbar_location: "top", 
     theme_advanced_toolbar_align: "left", 
     theme_advanced_statusbar_location: "bottom", 
     remove_trailing_nbsp: true, 
     entity_encoding: "numeric", 
     theme_advanced_resizing: true, 
     language: "en", 
     document_base_url: "", 
     extended_valid_elements: "img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]" 
    }); 

回答

0

結果Twitter Bootstrap css覆蓋了img標籤並對其應用了一些樣式屬性。評論這條線解決了我的問題。

img { 
    width: auto\9; 
    height: auto; 
    max-width: 100%; 
    vertical-align: middle; 
    border: 0; 
    /*-ms-interpolation-mode: bicubic;*/ -- THIS LINE, COMMENT IT OUT. 
}