microbin
microbin copied to clipboard
Allow pasting files directly into the page
I would like to be able to take a screenshot (which is copied to my clipboard), and paste it directly into microbin. That way I don't need to save it to my PC and select the file.
@szabodanika are you already working on it? maybe we create a PR for it
No, not just yet. I am also not quite sure how we would go about this. Can this be done with simple vanilla JS? If so then I am very happy with you working on a PR for this
Good news - It seems fairly straightforward with vanilla JS!
https://stackoverflow.com/questions/6333814/how-does-the-paste-image-from-clipboard-functionality-work-in-gmail-and-google-c
https://stackoverflow.com/questions/490908/paste-an-image-from-clipboard-using-javascript
https://codepen.io/ahw/pen/qEPRzW
I have a ton of experience with JS, though none with Rust, so not sure how helpful I'd be on this one.