如何禁用TinyMCE的文本区域 [英] How to disable TinyMCE's textarea

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

问题描述

我尝试了以下所有操作:

I've tried all of the following:

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

tinyMCE.init( mode: "none" ); //throws an error

这是我加载TinyMCE的方式:

This is how I'm loading 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.');
        });
    }
});

推荐答案

readonly : true添加到您的参数中.

这篇关于如何禁用TinyMCE的文本区域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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