From effc080bae340a8fd2a20322bb243b5fb82e3cce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nathana=C3=ABl=20Jourdane?= Date: Wed, 6 Mar 2019 15:36:58 +0100 Subject: [PATCH] [wip upload-image] Allow image upload with copy-paste --- src/js/easymde.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/js/easymde.js b/src/js/easymde.js index 436c2cf..0fe954d 100644 --- a/src/js/easymde.js +++ b/src/js/easymde.js @@ -1580,6 +1580,10 @@ function EasyMDE(options) { event.preventDefault(); self.uploadImages(event.dataTransfer.files); }); + + this.codemirror.on('paste', function(cm, event) { + self.uploadImages(event.clipboardData.files); + }); } }