0

所以,我使用的是 TinyMCE 3.5.9。效果很好,除非在 IE 中调整图像大小。TinyMCE 不会将样式标签附加到宽度和高度标签。这会导致 Internet Explorer 10、9、8 等出现问题。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]"
    });
4

1 回答 1

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.
}
于 2013-10-28T16:39:58.583 回答