TinyMCE 在 FireFox 上不起作用 [英] TinyMCE doesn't work on FireFox

查看:92
本文介绍了TinyMCE 在 FireFox 上不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的网站中使用 tinymce 编辑器,但是,在插入其代码后,它在 Firefox 上不起作用(在 IE9 上运行良好,没有错误等).这是我的代码的样子:

I'm trying to use tinymce editor in my website but, afert inserting its code it doesnt work on firefox (on IE9 works well, no bugs etc.). This how my code look like:

<tr>
    <td class="ui-corner-left" style="width:200px; font-size:14px;color:#fff; background:#606060; padding:5px;">Wiadomość</td>
    <td class="ui-corner-right" style="font-size:14px; background:#eaeaea; padding:5px;">&nbsp;</td>
</tr>
<tr>
     <td>&nbsp;</td>
     <td style="padding:5px;"><textarea id="tinymce" name="wiadomosc" cols="50" rows="10" style="width:100%;"><?php echo set_value('wiadomosc'); ?></textarea>
     </td>
</tr> 

声明:

<script type="text/javascript" src="<?=base_url()?>js/tinymce/tinymce.min.js"></script>

并与 textarea 连接:

And connecting with textarea:

tinyMCE.baseURL = "<?=base_url()?>js/tinymce/";
    tinymce.init({
    selector: "textarea",
    language : 'pl',
    menubar: false,
    convert_urls : false,
    relative_urls : false,
    plugins: "textcolor, code",
    toolbar: "undo,redo,|,bold,italic,underline,strikethrough,|,alignleft,aligncenter,alignright,alignjustify,|,cut,copy,paste,pastetext,pasteword,|,forecolor,|,code",
    }); 

Firebug 是这样说的:

This is what Firebug says:

Failed to load: http://192.168.200.233/js/tinymce//themes/modern/themeundefined.js
Failed to load: http://192.168.200.233/js/tinymce//plugins/code/pluginundefined.js
Failed to load: http://192.168.200.233/js/tinymce//plugins/textcolor/pluginundefined.js

我正在使用 codeigniter 和 jQuery.

Im using codeigniter and jQuery.

这段代码在其他 10 个文件中运行良好,但在这个文件中不起作用,我不知道为什么.

This code work good in 10 other files but not in this one, i have no idea why.

推荐答案

如果 TinyMCE 无法确定其插件/主题文件的正确后缀,就会发生这种情况.通常在您重命名 TinyMCE 主脚本文件时会发生这种情况.请注意,TinyMCE 脚本加载器具有可识别文件名的硬编码列表:

This can happen if TinyMCE cannot determine the correct suffix for its plugin / theme files. Usually this happens when you rename the TinyMCE main script file. Note that the TinyMCE script loader has a hard-coded list of recognized file names:

// Script types supported:
// tinymce.js tinymce.min.js tinymce.dev.js
// tinymce.jquery.js tinymce.jquery.min.js tinymce.jquery.dev.js
// tinymce.full.js tinymce.full.min.js tinymce.full.dev.js

因此,如果您确实需要为主 TinyMCE 脚本文件提供非标准文件名,则可能需要以编程方式提供默认的.min"后缀:

so you might need to provide the default ".min" suffix programmatically if you really need to have a non-standard file name for the main TinyMCE script file:

tinymce.suffix = ".min"

这篇关于TinyMCE 在 FireFox 上不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆