简体   繁体   English

TinyMCE-图像大小属性问题IE10-Twitter Bootstrap

[英]TinyMCE - Image size attributes issue IE10 - Twitter Bootstrap

I am using SnailCMS with TinyMCE 4. When TinyMCE resizes an image it adds the size as attributes and not inline styles. 我将SnailCMS与TinyMCE 4配合使用。当TinyMCE调整图像大小时,它会将尺寸添加为属性而不是内联样式。 Since IE10 ignores the width & height attributes the images do not resize and stay the original size! 由于IE10忽略width和height属性,因此图像不会调整大小并保持原始大小!

I know this is not a new issue but I have been searching and searching for a resolution but I cannot find one anywhere! 我知道这不是一个新问题,但我一直在寻找解决方案,但找不到任何地方!

Has anyone resolved this? 有人解决了吗?

Also: commenting out img{-ms-interpolation-mode: bicubic;} did not work for me. 另外:注释掉img {-ms-interpolation-mode:bicubic;}对我不起作用。

Thanks all!! 谢谢大家!

I hope I properly understand what you're asking. 希望我能正确理解您的要求。 What I believe you're asking is that when you add an image to the text field that TinyMCE overrides, the image that is displayed is smaller than the actual file that you chose through the image selection widget. 我相信您要问的是,当将图像添加到TinyMCE覆盖的文本字段时,显示的图像小于通过图像选择小部件选择的实际文件。 What I always do when I used TinyMCE is stick in the classic meta elements in the head of my page, which consist of: 当我使用TinyMCE时,我总是做的就是坚持页面顶部的经典meta元素,这些元素包括:

<meta charset="utf-8">
  <title>My Website</title>
  <!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame -->
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="description" content="(your desc. here...)">
  <meta name="author" content="(your name here...)">
</meta>

If you notice the 4th line, that forces IE's rendering engine to ALWAYS be the latest version. 如果您注意到第四行,那将迫使IE的渲染引擎始终为最新版本。 Because TinyMCE isn't know for being to "up-to-date" at times and having IE issues, this will make sure that images rendered through IE always appear in the latest dimensions, as that is what the latest version of IE's rendering engine (as of this post) does. 因为不知道TinyMCE有时会“最新”并出现IE问题,所以这将确保通过IE渲染的图像始终以最新尺寸显示,因为这就是IE渲染引擎的最新版本。 (截至本文)。

I eventually discovered CodeMirror , which is a MUCH better option for an efficient, up-to-date, open-source, and widely compatible text editor. 我最终发现了CodeMirror ,它是高效,最新,开源且广泛兼容的文本编辑器的更好选择。 I would highly recommend looking into it. 我强烈建议您调查一下。

Hope this helps! 希望这可以帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM