使用layedit.setContent(index,"") 即可以清除
layui.use('layedit', function(){
var layedit = layui.layedit;
});
var layedit = layui.layedit;
var index = layedit.build('demo'); //建立编辑器
layedit.setContent(index,"") //清除编辑器内容
layui.use('layedit', function(){
var layedit = layui.layedit;
});
var layedit = layui.layedit;
var index = layedit.build('demo'); //建立编辑器
layedit.setContent(index,"") //清除编辑器内容