nhn / tui.editor

🍞📝 Markdown WYSIWYG Editor. GFM Standard + Chart & UML Extensible.
http://ui.toast.com/tui-editor
MIT License
16.91k stars 1.72k forks source link

this.$refs.toastEditor.invoke('setHTML', value) is not working.. #3164

Closed hyunn12 closed 10 months ago

hyunn12 commented 10 months ago

I use '@toast-ui/vue-editor' v3.2.1 with vue2 It works until a few days ago, but it suddenly does not work since last weekend.

The weird thing is this.$refs.toastEditor.invoke('getHTML') is work, but only this.$refs.toastEditor.invoke('setHTML', value) is not work.

this is my vue component code. and there no error message in console

<template>
  <div>
    <editor ref="toastEditor" initialEditType="wysiwyg"></editor>
  </div>
</template>

<script>
import { Editor } from '@toast-ui/vue-editor'

export default {
  components: {
    editor: Editor
  },
  methods: {
    getContents: function () {
      this.$refs.toastEditor.invoke('getHTML')
    },
    setContents: function (value) {
      // value format like '<p>test</p><p>test</p>'
      // there's nothing in editor
      this.$refs.toastEditor.invoke('setHTML', value)
    }
  }
}
</script>

image

hyunn12 commented 10 months ago

I found other menu's editor is working now..