• Marco Cyriacks's avatar
    Fix raw image paste from clipboard · 8ae1f1dbcd9c
    Marco Cyriacks authored
    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.
dropzone_input.js.coffee 7.38 KB