我用的是layui 2.5.6版本,需要的自行官网下载 首先在HTML中定义一个文本域,并设好id值: <textarea id="content" class="layui-textarea"></textarea> 然后在JS部分初始化Layui并引入layedit模块: