2
0
mirror of https://github.com/Ionaru/easy-markdown-editor synced 2025-07-03 08:04:29 -06:00

[wip upload-image] Allow image upload with copy-paste

This commit is contained in:
Nathanaël Jourdane 2019-03-06 15:36:58 +01:00
parent fa2c299455
commit effc080bae

View File

@ -1580,6 +1580,10 @@ function EasyMDE(options) {
event.preventDefault(); event.preventDefault();
self.uploadImages(event.dataTransfer.files); self.uploadImages(event.dataTransfer.files);
}); });
this.codemirror.on('paste', function(cm, event) {
self.uploadImages(event.clipboardData.files);
});
} }
} }