Some DOM queries were to broad which caused paperclip icons and spinners
to be added multiple times to a dropzone in case of multiple dropzones
on a page.
This patch binds the textarea (markdown area) paste event to the
handlePaste() function (that was already present).
Furthermore the event processing is improved in the following way:
- The default paste event handler of the browser is only disabled if the
browser fully supports clipboardData AND there realy is image data in
the event object. In all other cases (no support or no image) the
default handler processes the text paste.
- Some obsolete code was removed.
- The pasteText() function (which is somehow buggy because it places the
cursor at the end of the text independantly from its position before the
paste) is only used to place the image link after image data was pasted.