Skip to content
Snippets Groups Projects
Commit a54e9e54 authored by Marco Cyriacks's avatar Marco Cyriacks
Browse files

Fix raw image paste from clipboard

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.
parent c4732894
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment