【问题标题】:Tiny MCE (jquery plugin version) not showing toolbar in IE (works fine in other browsers)Tinymce(jquery 插件版本)在 IE 中不显示工具栏(在其他浏览器中工作正常)
【发布时间】:2010-11-22 18:36:09
【问题描述】:

我有一个运行良好的实现,但出于某种原因,IE 认为它厌倦了玩得很好。我有一个 TinyMCE 的高级实现(jquery 插件版本 - 有关详细信息,请参阅http://tinymce.moxiecode.com/examples/example_23.php)。

它在除 IE 之外的所有浏览器中仍然运行良好。在 IE 中,它显示了 Format、Font family 和 Font size 的下拉选项,但仅显示为文本……而不是通常看起来的下拉选项。工具栏上的所有其他按钮都不见了。 (我试过IE8和IE8兼容模式)

我收到一个 javascript 错误:语法错误第 36 行字符 1。 不幸的是,javascript 是动态加载的,所以这对我没有帮助。

这是我的 TinyMCE 编辑器的实现代码:

$(function ()
{
    $('#InputStuffHere').tinymce({
        // General options
        theme: "advanced",
        plugins: "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,inlinepopups,preview,media,searchreplace,contextmenu,paste,fullscreen,noneditable,visualchars,nonbreaking,template",

        // Theme options
        theme_advanced_buttons1: "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,formatselect,fontselect,fontsizeselect,|,hr,removeformat",
        theme_advanced_buttons2: "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,image,|,forecolor,backcolor,|,spellchecker",
        theme_advanced_buttons3 : "",
        theme_advanced_toolbar_location: "top",
        theme_advanced_toolbar_align: "left",
        theme_advanced_statusbar_location: "bottom",
        theme_advanced_resizing: true,

        // Drop lists for link/image/media/template dialogs
        template_external_list_url: "lists/template_list.js",
        external_link_list_url: "lists/link_list.js",
        external_image_list_url: "lists/image_list.js",
        media_external_list_url: "lists/media_list.js",

        //initialization callback
        init_instance_callback: "TinyMCEReady",
        add_form_submit_trigger : false

    });
});

所以...有人看到过这样的事情或对我有什么想法吗?非常感谢大家!

【问题讨论】:

    标签: jquery internet-explorer jquery-plugins tinymce


    【解决方案1】:

    您的 tinymce 是否可以与非 jquery 版本的 tinymce 一起使用?如果是,那么我建议您使用那个。 jquery tinymce 版本在处理编辑器内容、打字等时耗时 4-6 倍...

    【讨论】:

    • 仍然无法正常工作,即使使用 tinyMCE.init 函数调用而不是通过 jQuery 加载。开始认为它与网站上的其他脚本有冲突。
    • 看来您必须一一关闭该javascript才能查看导致错误的原因
    • 我刚刚删除了不需要的 javascript 包含并且它有效。我从来没有弄清楚哪一个与它发生冲突,但如果我这样做了,我会把它贴在这里供其他人参考。感谢您的回复。
    猜你喜欢
    • 2016-12-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-08-26
    • 1970-01-01
    • 1970-01-01
    • 2020-02-17
    相关资源
    最近更新 更多