Rovak / InlineAttachment

Easily paste and upload files/images in plain textareas
http://git.razko.nl/InlineAttachment
MIT License
620 stars 77 forks source link

Vue.js Support? #81

Closed loktarjugg closed 7 years ago

loktarjugg commented 7 years ago

Would you plan to support vue.js? @Rovak

Rovak commented 7 years ago

vue.js already supports the use of plugins like jQuery. I guess you are looking for a vue.js directive?

In that case you could make a vue.js directive using the following code:

Vue.directive('inline-attachment', function (el, binding) {
  inlineAttachment.editors.input.attachToInput(el);
})

then use it like this:

<textarea inline-attachment></textarea>

Note that i haven't tested this code myself.

loktarjugg commented 7 years ago

I use it like that image

When i paste a image , browser throw the bug : image

Rovak commented 7 years ago

Are you sure that you are binding it to a textarea? If you can provide a jsfiddle example then maybe i can help you.

loktarjugg commented 7 years ago

I found the problem, because i used simplemde

I refer to this link issues

image

and it works !

Thanks

ashvin-php commented 4 years ago

@loktarjugg I am new to vuejs. Can you please guide me how you put this inline attachment as vue directive. I am facing similar issue to integrate this inline attachment with vue-simplemde v1.0.4

Thanks.