uploader icon indicating copy to clipboard operation
uploader copied to clipboard

Support pasting from clipboard

Open yusanshi opened this issue 5 years ago • 3 comments

Add support for getting image from clipboard (For example, use Windows+Shift+S to capture a screenshot then Ctrl+V in the website). Test OK on Chrome 78. Not working on Microsoft Edge.

yusanshi avatar Nov 16 '19 13:11 yusanshi

please disable your auto-code-format function. I was curious to see the code needed to do that, but there's so much diff because you add spaces before brackets etc...

ZARk-be avatar Nov 19 '19 14:11 ZARk-be

Well it's my fault ... 😅😅 Fixed now.

yusanshi avatar Nov 19 '19 20:11 yusanshi

A tip if you want to preview the image after the 'paste' event:

onNewFile: function(id, file) { if ((file.type == 'image/png') || (file.type == 'image/jpg') || (file.type == 'image/jpge')) { $('').attr('src', window.URL.createObjectURL(file)).width('100px').height('100px').appendTo($('#drag-and-drop-zone')); }}

Schaidhauer avatar Jun 24 '20 14:06 Schaidhauer