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

时间:2015-05-12 15:44:44   收藏:0   阅读:307
  1. 我使用ckeditor 我在编辑的使用源码编辑,保存内容包含javascript、style标签的时候,数据库中有javascript、style标签 ,
  2. 输入到页面也可以执行,但是我再次编辑的时候就不见了。添加allowedContent: true就可以了
  3. CKEDITOR.replace( ‘textarea_id‘, { allowedContent: true});
  4. 也可以通过在config.js中添加config.allowedContent = true;实现 
评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!