refactory-id / bootstrap-markdown

Bootstrap plugin for markdown editing
Apache License 2.0
1.99k stars 370 forks source link

Dropzone path incorrect when image is dropped onto bootstrap-markdown text area #258

Open webdevbrian opened 8 years ago

webdevbrian commented 8 years ago

This is a bug with the success callback of the image upload in the bootstrap-markdown plugin, it's calling just "path" however path is an object, so the fix is to append "path.url".

The fix (around line 482): textarea.val(text.substring(0, caretPos) + '\n![description](' + path.url + ')\n' + text.substring(caretPos));

I'll make a PR for this later on, but just incase I get hit by a car and someone else has the same bug trying to incorporate dropzone :)

webdevbrian commented 8 years ago

Here's the PR for this : https://github.com/toopay/bootstrap-markdown/pull/259