ChangJoo-Park / vue-editor-js

editor.js for Vue users

Home Page:https://codesandbox.io/embed/o7lyqwmvmq

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't set init-data from an event.

chuantv opened this issue · comments

Like the title, I can't init-data when my data get from my server, though everything else is fine with sample https://github.com/ChangJoo-Park/vue-editor-js/blob/master/demo/Demo.vue

Version: 2.0.2.

Just started a new project using this amazing editor. Thanks for the wrapper, but the lack of documentation is a bit frustrasting...
To your question: use the render() function

Example from my project

watch: {
    case: function(caseItem) {
      this.currentCase = { ...caseItem };
      this.message = "";
      this.$refs.editor._data.state.editor.render(caseItem.content);
    },
  },

But render function will alway trigger change event of editor.