<template>
  <quill-editor ref="myTextEditor"
                v-model="content"
                :config="editorOption"
                @focus="onEditorFocus($event)"
                @blur="onEditorBlur($event)"
                @change="onEditorChange($event)"
  >
  </quill-editor>
</template>

<script>
  import {quillEditor} from 'vue-quill-editor'

  export default {
    components: {
      quillEditor
    },
    props: [],
    name: 'QuillEdit',
    data() {
      return {
        content: '<h2>I am Example</h2>',
        editorOption: {
          theme: 'snow'
        }
      }
    },
    mounted() {
    },
    methods: {
      // 准备富文本编辑器
      onEditorReady(editor) {
      },
      // 富文本编辑器 失去焦点事件
      onEditorBlur(editor) {
      },
      // 富文本编辑器 获得焦点事件
      onEditorFocus(editor) {
      },
      // 富文本编辑器 内容改变事件
      onEditorChange(editor) {
      },
    }
  }
</script>

<style scoped>

</style>
