Skip to content

Implements clipboard feature for markdown areas.

Matthias Käppler requested to merge github/fork/erbunao/markdown_clipboard into master

Created by: erbunao

This is our (w/ @nmcalabroso) attempt to extend the drag and drop feature in every markdown area (#7011). We have tested this feature in Mac OSX (Mavericks) and hoping to receive more feedbacks (with different OS) from you. Unfortunately, chrome is the only browser that supports the html5 clipboard.

Note:

  1. This PR doesn't support multiple files in clipboard. In case this event happens, the uploader is just sending the one at the top of the clipboard's list.
  2. Some images during our testing are uploaded incorrectly so we tried these same images in github to see if this is the expected behavior and as far as we know, it is. We're suspecting that the clipboard is OS dependent so further testing will be appreciated.

Samples:

Copy-pasting to upload image in creating issue: copy_paste_issue

Output: copy-paste-result

Copy-pasting multiple files: copy_paste_multiple

Output: copy-paste-merge-result

Copy-pasting from web browser: copy_paste_browser

Output: copy_paste_wiki

Error handling: copy_paste_error

Merge request reports

Loading