davidroyer / vue2editor-images

Example of using new image upload to server feature for Vue2Editor
18 stars 11 forks source link

The new Vue syntax requires to use hyphen for props/emits #1

Open j0eii opened 4 years ago

j0eii commented 4 years ago
      this.$emit("image-added", file, Editor, cursorLocation, resetUploader);

Which needs the parent to use

@image-added="functionNameHere"

Instead of

@imageAdded

Its not working in newer versions, I tried and fixed myself. Hope this things helps those new comers.

joshca1 commented 4 years ago

This works for me as well, thank you.

KayaOndul commented 4 years ago

thank you @j0eii

pandisoft commented 4 years ago

I had an issue while trying to use this feature, followed this example https://github.com/davidroyer/vue2editor-images/blob/master/src/App.vue

It seems that the example is old and uses old event emit name maybe need to updated :)