如何使用jQuery禁用CKeditor [英] How to disable CKeditor with jQuery

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

问题描述

我在我的Web应用程序中使用 CKEditor ,并且需要从javascript禁用/启用编辑器.我知道有一个名为 readOnly 的选项,但我没有不知道如何从jQuery进行设置.

I am using CKEditor in my web application and need to disable/enable the editor from javascript. I know that there is an option called readOnly but I don't know how to set it from jQuery.

有人知道如何使用jQuery禁用和启用CKEditor吗?

Does anybody know how to disable and enable back the CKEditor using jQuery please?

推荐答案

最简单的方法:

禁用 CKEditor:

To disable CKEditor:

CKEDITOR.instances['TEXTAREA_NAME'].setReadOnly(true);

启用 CKEditor:

To enable CKEditor:

CKEDITOR.instances['TEXTAREA_NAME'].setReadOnly(false);

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

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