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: 2022-04-11 06:40:29

results matching ""

    No results matching ""