TinyMCE插入图像 - 单击时浏览按钮不执行任何操作

时间:2012-12-19 11:49:39

标签: c# javascript tinymce

我使用了tinyMCE编辑器,并且我在工具栏上添加了插入图像按钮,但是当我点击浏览按钮时没有任何反应!我刚收到此错误" TypeError:p未定义"

这里是tinyMCE的配置文件:

tinyMCE_GZ.init({
    // plugins: 'style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras',
    themes: 'simple,advanced,searchreplace',
    languages: 'en',
    disk_cache: true,
    debug: false
});

tinyMCE.init({
    // General options
    mode: "textareas",
    theme: "advanced",
    skin: "o2k7",
    plugins: "autolink,lists,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
    // Theme options
    //theme_advanced_buttons1: "newdocument,template,|,bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull,|,fontselect,fontsizeselect,|,undo,redo,|,image,media,|,forecolor,backcolor,|,print",
    theme_advanced_buttons1: "bold,italic,underline,|,bullist,numlist,|,justifyleft,justifycenter,justifyright,justifyfull,|,fontselect,fontsizeselect,|,forecolor,|,image,media",
    theme_advanced_toolbar_location: "top",
    theme_advanced_toolbar_align: "left",
    theme_advanced_statusbar_location: "bottom",
    theme_advanced_resizing: true,

    file_browser_callback: "openBrowser",


    // Skin options
    skin: "o2k7",
    //skin_variant: "Blue",
    content_css: "../../Scripts/tiny_mce/themes/simple/skins/o2k7/content.css",

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

    // Replace values for the template plugin
    template_replace_values: {
        username: "Some User",
        staffid: "991234"
    },

    //To prevent having new paragraph each line
    force_br_newlines: true,
    force_p_newlines: false,
    forced_root_block: '', // Needed for 3.x

    setup: function (ed) {
        ed.onActivate.add(function (ed) {
            cursorRange = ed.selection.getRng();
        });

        ed.onKeyUp.add(function (ed, e) {
            //To Update cursor location when arrows, PgUp , PgDwn , Home & End keys are pressed
            if (e.keyCode >= 33 && e.keyCode <= 40) {
                cursorRange = ed.selection.getRng();
            }
        });

        ed.onInit.add(function (ed) {
            ed.focus();
            cursorRange = ed.selection.getRng();
        });

        ed.onActivate.add(function (ed) {
            ed.focus();
            cursorRange = ed.selection.getRng();
        });

        ed.onClick.add(function (ed, e) {
            cursorRange = ed.selection.getRng();
        });
    },


    theme_advanced_statusbar_location: "none"

});

如何启用它?

感谢。

1 个答案:

答案 0 :(得分:1)

你使用的tinymce版本超过五年(!!!)并且已经过时了。它不适用于任何较新的浏览器。您需要下载更新版本的tinymce并使用该版本。

相关问题