Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't set init-data from an event. #87

Open
chuantv opened this issue Apr 9, 2021 · 2 comments
Open

Can't set init-data from an event. #87

chuantv opened this issue Apr 9, 2021 · 2 comments

Comments

@chuantv
Copy link

chuantv commented Apr 9, 2021

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.

@d4rxt4r
Copy link

d4rxt4r commented Apr 12, 2021

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);
    },
  },

@vincentsptang
Copy link

But render function will alway trigger change event of editor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants