禁用CKEditor,用JS重新启用
我有以下内容: 允许用户在 CKEditor 中写入文本的 POST 页面 查看页面,查看 CKEditor 中的文本
如何使查看页面中的 CKEditor 为只读,这意味着用户无法编辑注释中的文本?我想在视图页面中使用CKEditor的原因有2个: 1. 我可以使用 JavaScript 将编辑器从禁用状态更改为启用状态 2. 保持POST和POST中的样式相同。查看页面。
这可能吗?谢谢!
乙
I have the following:
POST page that allows users to write text in CKEditor
VIEW Page, that views the text in CKEditor
How can I make CKEditor in the view page READ only, meaning the user can not edit the text in the note? The reason I want to use CKEditor in the view page is for 2 reasons:
1. I can use JavaScript to move the editor from disabled to enabled
2. Keep the styles the same from the POST & View page.
Is this possible? Thanks!
B
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
不确定您是否仍在寻找答案,但这就是我所做的,它比他们建议的解决方法简单得多。
not sure if you are still looking for an answer but here is what I did and it was much simpler than the work around they suggest.
检查讨论该问题的此 CKEditor 论坛条目,并且CKEditor 团队成员提供了一种解决方法。
Check this CKEditor forum entry where the issue is discussed, and a CKEditor team member provides a workaround.
该线程的一个重要更新,从 3.6 开始,由以下支持:
http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor .html#setReadOnly
An important update to this thread, as of 3.6 this is supported by:
http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#setReadOnly