VueQuill 富文本编辑器技术文档快速上手
warning:
这篇文章距离上次修改已过206天,其中的内容可能已经有所变动。
<template>
<div id="app">
<quill-editor v-model="content"></quill-editor>
</div>
</template>
<script>
import { quillEditor } from 'vue-quill'
export default {
components: {
quillEditor
},
data() {
return {
content: ''
}
}
}
</script>
<style>
@import '~quill/dist/quill.core.css';
@import '~quill/dist/quill.snow.css';
@import '~quill/dist/quill.bubble.css';
</style>
这段代码展示了如何在Vue应用中引入vue-quill
富文本编辑器组件,并在一个简单的Vue实例中使用它。quill-editor
组件绑定了一个名为content
的Vue实例数据属性,用于获取和设置编辑器的内容。在<style>
标签中导入了Quill的样式文件,以确保编辑器正确显示。
评论已关闭