使readonly /禁用tinymce textarea [英] make readonly/disable tinymce textarea
本文介绍了使readonly /禁用tinymce textarea的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用配置参数只读
tinyMCE。 init({
...
主题:高级,
只读:1
});
这是链接到演示。
更新:
您可以做些什么来防止用户编辑编辑器中的内容是将编辑器iframe body的contenteditable属性设置为false:
tinymce.activeEditor.getBody()。 setAttribute('contenteditable',false);
I need to disable or make readonly a tinymce textarea at runtime.
解决方案
Use the configuration parameter readonly
tinyMCE.init({
...
theme : "advanced",
readonly : 1
});
Here is a link to a demo.
Update: What you can do to prevent users from editing content in your editor is to set the contenteditable attribute of the editors iframe body to false:
tinymce.activeEditor.getBody().setAttribute('contenteditable', false);
这篇关于使readonly /禁用tinymce textarea的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文