Ionaru / easy-markdown-editor

EasyMDE: A simple, beautiful, and embeddable JavaScript Markdown editor. Delightful editing for beginners and experts alike. Features built-in autosaving and spell checking.
https://stackblitz.com/edit/easymde
MIT License
2.41k stars 316 forks source link

imageUploadFunction to mediaUploadFunction #269

Open ConstantMath opened 3 years ago

ConstantMath commented 3 years ago

First, thanks a lot for that very usefull script.

I made a small improvement that I found usefull you want to upload a file instead of just an image, so it creates a markdown link instead of an image.

Actually it works with drag & drop only, but I would find it nice to be able to add a 'Media upload' button instead of image upload for uploading pdf, doc, video, etc.

What do you think ?

https://github.com/variablebxl/easy-markdown-editor/pull/1/commits/22f7287d187a60f11a95cbc9c6b08accc0e122ae

philgruneich commented 2 years ago

I'm having issues with this feature since it converts BLOB urls to links instead of images. The "imageUploadFunction" should handle everything as images.