ThinkPHP5.0学习3 — Ueditor的引入

Ueditor的引入:

1.  在后台资源目录(public/static/后台资源)下新建文件夹Ueditor,将ueditor文件内容复制到该文件夹下。

2.  在需要使用的html文件中引入三个js文件:

    ueditor.config.js

    ueditor.all.min.js

    lang/zh-cn/zh-cn.js

3.  在需要使用ueditor的文本域编辑器显示处写 id="content"

4.  Html代码底部写入

  <script type="text/javascript">

      //实例化编辑器

      //建议使用工厂方法getEditor创建和引用编辑器实例,如果在某个闭包下引用该编辑器,直接调用UE.getEditor('editor')就能拿到相关的实例

      UE.getEditor('content',{initialFrameWidth:1500,initialFrameHeight:400,});

  </script>

5.  Ueditor引入成功!

原文地址:https://www.cnblogs.com/JasonLiuys/p/6491465.html