<template>
  <div id="app">
    <button @click="insertHtml">插入html</button>
    <kind-editor id="kind-editor" v-model="content" ref="editor" :upload="upload"></kind-editor>
    内容：
    <div v-html="content"></div>
  </div>
</template>

<script>
import KindEditor from './export'
export default {
  name: 'app',
  components: {
    KindEditor
  },
  data () {
    return {
      content: 'Welcome to Your Vue.js App'
    }
  },
  methods: {
    insertHtml () {
      this.$refs.editor.insertHtml('insert html')
    },
    upload () {
      console.log('upload')
      this.$refs.editor.insertHtml('upload')
    }
  }
}
</script>

<style>

</style>
