[jQuery] Using Draggable on images and generate markdown syntax?
Hi,
I am currently using markdown for content input using the wmd-editor.
I have a idea that putting a list of uploaded images beside the edit
area and make the pictures draggable using jquery ui. By using the
clone helper of the Draggable plugin, I managed to have the link of
the images dropped to the edit box.
I am thinking of making the drag&drop more convinient if the drop text
can be generated as markdown syntax instead of just the image links.
I am not familier with javascript so I think it would be tough for me
to do the draggable:stop callback. Just wonder anyone can give some
hints. Thanks in advance.
The callback need to insert the tag ![alt text][1] at current cursor,
the [1] is a self-increased index. And at the end of the edit box, the
list of the images will be listed like: [1]: http://abc.com/test.jpg
which the [1] is the index accordingly.