TP5-百度富文本编辑器

1.首先下载 ueditor文件

2.把文件放到 public\static\admin(后台) 下面

3、头部引入(注意前面加__PUBLIC__)
    ueditor.config.js
    ueditor.all.min.js
    lang/zh-cn/zh-cn.js

4、编辑器显示处加  id="content"

3、底部
  <script type="text/javascript">

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

  </script>

5、好了,差不多能用了,也可以在上面调整宽高

6、如果一个要添加两个编辑器的话,底部再换一个名字就可以了

猜你喜欢

转载自www.cnblogs.com/chibrow/p/9351807.html
今日推荐