JSFiddle - React, Tailwind, and code Playground
by SaschaKluth
HTML
Copy image from clipboard in Firefox.<br />
Select the box below and paste a image from clipboard via ctrl+v<br />
Data printed at console<br />
<div id="one" contenteditable="true"></div>
CSS
#one {
border: 1px solid black;
min-height: 100px;
min-width: 100px;
}
JavaScript
$(function() {
$("#one").bind("input paste", function(ev) {
window.setTimeout(function(ev) {
var input = $("#one").children()[0].src;
var s = input.split(',');
var mime = s[0];
var data = s[1];
console.log(mime);
console.log(data);
}, 300);
});
});