Vue2.0 使用wangEditor(富文本編輯器)
1、安裝
npm install wangeditor --save
2、頁面中使用
2.1 定義容器
<div id="content"></div>
2.2 引用 wangeditor
// 引入wangeditor
import wangEditor from "wangeditor";
2.3 創建實例,調用它的方法,使頁面中呈現富文本編輯
在mouted()勾子函數中操作
mounted() {
// 創建實例
let edit = new wangEditor("#editor");
// 生成頁面的富文本編輯器、
edit.create();
}
浙公網安備 33010602011771號