官网:https://www.wangeditor.com/v5/installation.html#npm
1、安装
yarn add @wangeditor/editor
或npm install @wangeditor/editor --save
yarn add @wangeditor/editor-for-vue
或npm install @wangeditor/editor-for-vue --save
2、在main.js中引入样式
import '@wangeditor/editor/dist/css/style.css'
3、在组件中引用并使用
<template>
<div class="rank">
<div style="border: 1px solid #ccc; margin-top: 10px">
<!-- 工具栏 -->
<Toolbar
style="border-bottom: 1px solid #ccc"
:editor="editor"
:defaultConfig="toolbarConfig"