[英]TinyMCE does not resize images in IE
因此,我正在使用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]"
});
事实证明,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.
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.