hinesboy / mavonEditor

mavonEditor - A markdown editor based on Vue that supports a variety of personalized features
http://www.mavoneditor.com/
MIT License
6.45k stars 918 forks source link

Insert image from global event #371

Closed mdeprezzo closed 5 years ago

mdeprezzo commented 5 years ago

Hi, i would know if i can insert an image from global event. Something like this:

i'm in a component without mavon editor, and i've in some point a method that emit some event:

this.$emit('add-image', objImg)

and inside the component with mavon editor, i'm listening for that event, but, if i tried to do this:

this.$refs.md.$imgUpdateByUrl(0, objImg.url)

and nothing happen, return false. what am i missing ?