vue-quill-edito在vue中使用
时间: 2023-08-27 14:05:07 浏览: 126
浅谈vue中使用编辑器vue-quill-editor踩过的坑
可以使用以下步骤来在Vue中使用vue-quill-editor:
1. 安装vue-quill-editor:
```
npm install vue-quill-editor --save
```
2. 在Vue组件中引入vue-quill-editor:
```
import VueQuillEditor from 'vue-quill-editor'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
export default {
components: {
VueQuillEditor
},
...
}
```
3. 在Vue组件中使用vue-quill-editor:
```
<template>
<div>
<vue-quill-editor v-model="content" />
</div>
</template>
<script>
import VueQuillEditor from 'vue-quill-editor'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
export default {
components: {
VueQuillEditor
},
data() {
return {
content: ''
}
}
}
</script>
```
希望这个回答能够帮到你!
阅读全文