我可以使用CKEDITOR工具栏,但内容是锁定/只读吗?

时间:2013-10-09 08:00:03

标签: javascript jquery ckeditor

我的问题是我需要使用ckeditor的工具栏来处理文本样式,但我需要限制用户更改内容。

这可能吗?

1 个答案:

答案 0 :(得分:0)

要设置为只读,请使用CustomConfig方法:

CKEDITOR.replace(id,{customConfig :readOnly:true});

Example: 
         <textarea id="editor1">Test</textarea>
         CKEDITOR.replace('editor1',{width:'700px',readOnly:true});

Js Fiddle Demo