ckeditor源码编辑模式,添加style、javascript内容丢失的解决

来源:互联网 发布:太原医院挂号软件 编辑:程序博客网 时间:2024/05/01 09:15
  1. 我使用ckeditor 我在编辑的使用源码编辑,保存内容包含javascript、style标签的时候,数据库中有javascript、style标签 ,
  2. 输入到页面也可以执行,但是我再次编辑的时候就不见了。添加allowedContent: true就可以了
  3. CKEDITOR.replace( 'textarea_id', { allowedContent: true});
  4. 也可以通过在config.js中添加config.allowedContent = true;实现 
0 0
原创粉丝点击