# 在线演示

# 演示效果

# 源码




 











































<template>
<div>
  <editor id="editor_id" height="500px" width="700px" :content="editorText"
          :afterChange="afterChange()"
          :pluginsPath="pluginsPath"
          :loadStyleMode="false"
          @on-content-change="onContentChange"></editor>
  <hr>
  文本内容:
  <div v-html="editorText"></div>
</div>
</template>

<script>
import 'kindeditor/kindeditor-all-min.js'
import 'kindeditor/themes/default/default.css'
import editor from 'vue-kindeditor/src/components/KindEditor'

export default {
  name: "hello",
  components: {
    editor
  },
  data() {
    return {
      header: {},
      editorText: '',
      pluginsPath: '/static/kindeditor/plugins/'
    }
  },

  mounted () {
  },
  methods: {
    onContentChange (val) {
      this.editorText = val
    },
    afterChange () {
    }
  }
}
</script>

<style scoped>

</style>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46