Destroy Editor

You can destroy editor instance by using editor.destroy(). The following example of Vue2.0:

import E from 'wangeditor'

export default {
  data() {
    return {
      editor: null
    }
  },
  mounted() {
    // create editor
    this.editor = new E(`#demo`)
    this.editor.create()
  },
  beforeDestroy() {
    // destroy editor
    this.editor.destroy()
    this.editor = null
  }
}
Copyright © wangEditor (2020 - present) all right reserved,powered by GitbookFile Modify: 2021-07-04 12:51:04

results matching ""

    No results matching ""