Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support pasting from clipboard #107

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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.

None yet

3 participants