vue-quill-editor怎么使用

看API各种百度使用vue-quill-editor,就是出不来啊啊啊啊啊啊啊,,,,,
我的组件代码是这样的:

<template>
<section class="editor" style="height: 800px;">

 <quill-editor class="quill-editor" ref="myTextEditor" v-model="content" :config="editorOption"></quill-editor>

</section>
</template>
<script>
import { quillEditor } from 'vue-quill-editor'
export default {

 name:'UE',
 data:function () {
   return {
     content:'',
     editorOption:{

     }
   }
 },

 methods:{
   getUEContent(){
     return this.editor.getContent()
   }
 },
 components:{
   quillEditor
 }

}
</script>
<style>
.quill-editor {

height: 745px;

}
</style>

结果是:

clipboard.png

下面还有一堆奇形怪状的样子,应该是哪一项没配置,,求指教QAQ---

阅读 8.7k
1 个回答

引入样式

import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
<quill-editor :options="editorOption"
                          ref="QuillEditor"
                          @blur="onEditorBlur($event)" @focus="onEditorFocus($event)"
                          @change="onEditorChange($event)"
                          @ready="onEditorReady($event)">
            </quill-editor>
  computed: {
            editor() {
                return this.$refs.QuillEditor.quill
            }
        }
onEditorChange({editor, html, text}) {
                this.content=html;
                console.log(html)
            },
            onEditorFocus() {

            },
            onEditorReady() {

            },
            onEditorBlur() {

            },
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题