TP6+layui 富文本编辑器layedit配置及图片上传
1、textarea标签
<textarea id="Ccontent" style="display: none;" name="Ccontent" class="layui-textarea"></textarea>
2、建立编辑器
var layedit = layui.layedit;
//建立编辑器
layedit.build('Ccontent',{
height:500//设置编辑器高度
});
3.配置图片上传
(1)新建upload控制器
<?php
namespace app\backend\controller;
use app\BaseController;
use think\facade\Request;
class Upload extends BaseController{
public function doup()
{
$file = request()->file(