下载UEedit到/public/ueditor下。ueditor1_4_3_3-utf8-php版
添加文章模版/h1sg/web/system/admin/view/article/article/create.html
修改文章模版/h1sg/web/system/admin/view/article/article/edit.html
引用示例
<!DOCTYPE HTML><html lang="en-US"><head><meta charset="UTF-8"><title>ueditor demo</title></head><body><!-- 加载编辑器的容器 --><script id="container" name="content" type="text/plain">这里写你的初始化内容</script><!-- 配置文件 --><script type="text/javascript" src="ueditor.config.js"></script><!-- 编辑器源码文件 --><script type="text/javascript" src="ueditor.all.js"></script><!-- 实例化编辑器 --><script type="text/javascript">var ue = UE.getEditor('container');</script></body></html>
支持iframe方法
说明:新版本ueditor要修改 xss过滤白名单
修改配置文件ueditor.config.js
搜索: whitList 增加下面第二行即可
,whitList:{iframe: ['frameborder','border','marginwidth','marginheight','width','height','src','id'],//增加这一行a: ['target', 'href', 'title', 'class', 'style'],
加入后iframe可以显示
<p> my<iframe width="1111" height="111" src=" / " frameborder="1"></iframe></p>
我发现江湖cms保存时过滤掉了iframe,无法保存。也需要修改一下,使它能保存内容到数据库。就可以了。