vue2-editor - npmhttps://www.npmjs.com/package/vue2-editor
1. 安装所需包
npm install vue2-editor
2. 使用Vue2-editor
<template>
<div id="app">
<!-- 3、使用组件 -->
<vue-editor v-model="content"></vue-editor>
</div>
</template>
<script>
// 1、引用包
import { VueEditor } from "vue2-editor";
export default {
// 2、添加组件
components: {
VueEditor
},
data() {
return {
content: "<h1>Some initial content</h1>"
};
}
};
</