相关疑难解决方法(0)

make readonly/disable tinymce textarea

我需要在运行时禁用或只读一个tinymce textarea.

html javascript jquery wysiwyg tinymce

47
推荐指数
4
解决办法
6万
查看次数

如何禁用TinyMCE的textarea

我已经尝试了以下所有方法:

$(#"tbxNote").attr("disabled", "disabled"); ////doesn't work
$(#"tbxNote").attr("disabled", "true"); //doesn't work either :)

tinyMCE.init( mode: "none" ); //throws an error
Run Code Online (Sandbox Code Playgroud)

这就是我加载TinyMCE的方式:

//load tinymce plugin
$('#tbxNote').tinymce({
    // Location of TinyMCE script
    script_url: '/common/scripts/tiny_mce/tiny_mce.js',

    // General options
    theme: "advanced",

    // Theme options
    theme_advanced_buttons1: "link,unlink",
    theme_advanced_buttons2: "", //important
    theme_advanced_buttons3: "", //important
    theme_advanced_toolbar_location: "top",
    theme_advanced_toolbar_align: "left",
    theme_advanced_statusbar_location: "bottom",
    theme_advanced_resizing: false,

    setup: function (ed) {
        ed.onClick.add(function (ed) {
            //ed.windowManager.alert('User clicked the editor.');
        });
    }
});
Run Code Online (Sandbox Code Playgroud)

jquery textarea tinymce

7
推荐指数
1
解决办法
1万
查看次数

标签 统计

jquery ×2

tinymce ×2

html ×1

javascript ×1

textarea ×1

wysiwyg ×1