NikulinIlya / vue-easymde

📝 Vue-EasyMDE - use easy-markdown-editor with vue.js.
MIT License
21 stars 10 forks source link

Unable to detect change from the outside #3

Open kolaente opened 4 years ago

kolaente commented 4 years ago

Whenever I change a value which I bound with v-model to an instance of vue-easymde and change it from the outside, it does not update inside of it.

This seems to be fixed in https://github.com/F-loat/vue-simplemde.

NikulinIlya commented 4 years ago

I believe that recent updates made depending on F-loat/vue-simplemde should solve this problem.

kolaente commented 4 years ago

Just tested it with the new version, does not seem to fix that particular bug.

evanre commented 3 years ago

Just faced with this issue. It seems that two-way binding feature explicitly closed here

vue-easymde/src/index.vue:

watch: {
  value(val) {
    if (this.isValueUpdateFromInner) {
      this.isValueUpdateFromInner = false;
    } else {
      this.easymde.value(val);
    }
  },
},

Hi, @NikulinIlya why do we need this isValueUpdateFromInner check?

suxur commented 3 years ago

Make sure you're using v-model instead of the value prop.

<vue-easymde v-model="your_value" />

This worked for me.

JuliusJacobitz commented 2 years ago

any updates on this?

I have a similar issue: If the v-model updates to an empty string, the change does not get detected. @NikulinIlya