Skip to content

Conversation

yusanshi
Copy link

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.

@ZARk-be
Copy link

ZARk-be commented Nov 19, 2019

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...

@yusanshi
Copy link
Author

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

@yusanshi yusanshi force-pushed the support_paste_from_clipboard branch from b0f703a to 899d442 Compare March 30, 2020 11:28
@Schaidhauer
Copy link

Schaidhauer commented Jun 24, 2020

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'));
}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants