好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

设置TinyMCE在线HTML编辑控件只读_html/css_WEB-ITnose

TinyMCE是一款主流在线HTML/Text编辑器,特定情况下需要设置成只读状态(比如用户访问权限受控时)。


有两种方法:一种是通过配置在控件初始化时设置,另外一种是运行时设置。

1. 通过配置在控件初始化时设置

tinyMCE.init({        ...        theme : "advanced",        readonly : 1}); 
2. 在运行时设置编辑器iframe body的contenteditable属性为false

tinymce.activeEditor.getBody().setAttribute('contenteditable', false); 


by iefreer

查看更多关于设置TinyMCE在线HTML编辑控件只读_html/css_WEB-ITnose的详细内容...

  阅读:29次