所以,我使用的是TinyMCE 3.5.9。效果很好,除非在IE中调整图像大小。 TinyMCE不会将样式标记附加到width和height标记。这会导致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]"
});
答案 0 :(得分: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.
}