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
Add Scan QR code from clipboard #3
Add Scan QR code from clipboard #3
Conversation
Thank you for your PR. I really appreciate that. Apologies, I messed up with the review. Haven't reviewed a pull request. I believe this is my first time. This PR is ready to merge, but I am still unsure about whether or not to use jQuery. I think it should be consistent. What do you think? |
I think so, this project can be developed further. So, the code must be consistent. I will fix that in the next commit |
Thanks. I will merge after that commit. |
c0e200b
to
74a669f
Compare
74a669f Now this PR follow jQuery format
I also added |
I have just tested it and it worked really well just as expected. Before merging, let me just add a little label to the interface, so users can notice this feature. |
Fixes: #2 |
Thanks, @raffifu. |
Add scan QR code from clipboard feature
this PR close #2
The idea is to use paste event and then grab the files object from
event.clipboardData
When the file object exist, call method
scanFile
from classhtml5Qrcode
. it will returndecodedText
if successful and when fail will callswal.fire
CAUTION
html5Qrcode
instance is private field fromhtml5QrcodeScanner
see this file on line (87). the problem can be solved by creatinghtml5Qrcode
directly (use Pro Mode as it says on the documentation)For demo visit this link