簡體   English   中英

TinyMCE插入圖片-單擊瀏覽按鈕不會執行任何操作

[英]TinyMCE insert image - browse button does nothing when clicked

我正在使用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"

});

如何啟用它?

謝謝。

您使用的tinymce版本已有5年以上的歷史了(!!!),並且已經過時了。 它不適用於任何較新的瀏覽器。 您將需要下載tinymce的最新版本並使用該版本。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM