简体   繁体   English

TinyMCE 4在IE9中没有显示工具栏图标(任何模式)

[英]TinyMCE 4 not showing toolbar icons in IE9 (any mode)

TinyMCE has this easy to use code, but I cannot see the toolbar icons in IE9 (the imgs don't load it seems). TinyMCE有这个易于使用的代码,但我看不到IE9中的工具栏图标(imgs似乎没有加载它)。

<html>
      <head><!-- CDN hosted by Cachefly -->
         <script src="//tinymce.cachefly.net/4.0/tinymce.min.js"></script>
         <script>        tinymce.init({selector:'textarea'});</script>
      </head>
      <body>
            <textarea>Your content here.</textarea>
      </body>
</html>

I've seen this similar post ( tinymce icons in internet explorer ), but the advice made no difference for me. 我见过这个类似的帖子( Internet Explorer中的tinymce图标 ),但这个建议对我来说没有任何区别。

I've tried putting the browser in different modes, nothing worked. 我试过把浏览器放在不同的模式,什么都没有用。 The only time I saw it work in IE was inside the EditPlus embedded browser, but I don't know exactly what that is. 我在IE中看到它工作的唯一一次是在EditPlus嵌入式浏览器中,但我不确切知道它是什么。

Works nicely in Chrome. 适用于Chrome。

EDIT- does work in IE when the file is loaded directly, eg. EDIT-在直接加载文件时可以在IE中工作,例如。 C:\\inetpub\\wwwroot\\tiny.html C:\\的Inetpub \\ wwwroot的\\ tiny.html

Thanks. 谢谢。

TinyMCE 4 uses a webfont containg all the icons. TinyMCE 4使用包含所有图标的webfont。 Make sure that they get loaded and that you allow cross-origin when loading the font with the header Access-Control-Allow-Origin: * 确保它们已加载,并且在使用标题Access-Control-Allow-Origin: *加载字体时允许跨Access-Control-Allow-Origin: *

One thing to check with IE is the font download security setting. 用IE检查的一件事是字体下载安全设置。 If the setting is set to "Disable" then the web font icons will not display because the font cannot be downloaded. 如果设置设置为“禁用”,则不会显示Web字体图标,因为无法下载字体。 The setting can be found by clicking the Custom level... button on the Security tab of the Internet Options dialog which can be accessed under Tools > Internet options. 单击“Internet选项”对话框的“安全”选项卡上的“自定义级别...”按钮可以找到该设置,该对话框可在“工具”>“Internet选项”下访问。

When I inspected the toolbar icons: I found that they are web fonts 当我检查工具栏图标时:我发现它们是Web字体

<i class="mce-ico mce-i-bold"></i>

like this stands for bold. 这样代表大胆。 That means as rightly said TINYMCE are using web fonts for the toolbar, which are not showing up. 这意味着正确地说TINYMCE正在使用工具栏的Web字体,这些字体没有显示出来。

There are some questions which answers the same issue on IE 9 and previous versions of chrome. 有一些问题可以解决IE 9和以前版本的chrome上的相同问题。 Here are the link 这是链接

Fontawesome Icons not working on IE9 and Chrome Fontawesome图标无法在IE9和Chrome上运行

which says: 其中说:

For the examples given below, assume that a document is located at http://example.com/page.html and all URL's link to valid font resources supported by the user agent. 对于下面给出的示例,假设文档位于http://example.com/page.html,并且所有URL链接到用户代理支持的有效字体资源。 Fonts defined with the 'src' descriptor values below will be loaded: 将加载使用下面的'src'描述符值定义的字体:

/* same origin (i.e. domain, scheme, port match document) */
src: url(fonts/simple.woff);

/* data url's with no redirects are treated as same origin */
src: url("data:application/font-woff;base64,...");

/* cross origin, different domain */
/* Access-Control-Allow-Origin response header set to '*' */
src: url(http://another.example.com/fonts/simple.woff);

Fonts defined with the 'src' descriptor values below will fail to load: 使用下面的'src'描述符值定义的字体将无法加载:

 /* cross origin, different scheme */
 /* no Access-Control-xxx headers in response */
 src: url(https://example.com/fonts/simple.woff);

/* cross origin, different domain */
/* no Access-Control-xxx headers in response */
src: url(http://another.example.com/fonts/simple.woff);

As seen on github https://github.com/tinymce/tinymce/tree/master/js/tinymce/skins/lightgray/fonts they are using icomoon fonts. 正如github https://github.com/tinymce/tinymce/tree/master/js/tinymce/skins/lightgray/fonts所见,他们使用的是icomoon字体。 So, download those and use on your own server. 因此,下载这些并在您自己的服务器上使用。 Hope it solves the purpose. 希望它能解决目的。

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

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