下载
npm install wangeditor
import E from "wangeditor";
使用
<div id="div1"></div>
var editor = new E('#div1')
editor.customConfig.uploadImgServer = `/upload/` // 上传图片地址
editor.customConfig.uploadFileName = 'file'
editor.customConfig.onchange = function (html) {
// html 即变化之后的内容
console.log(html)
}
editor.create()