I would like to trigger onpaste event on element to retrieve data in clipboard (I want to check if image exists in clipboard and upload it into the server). It works perfect on
Sure I can. In this example I retrieve image from clipboard after using Ctrl+V:
Paste here!
$('#foo')[0].onpaste = function(e)
{
setTimeout(function()
{
var blob = $('#foo img').attr('src');
$.post('/upload/image', {'data': blob}, function(result)
{
}, 'json');
}, 200);
}
It works with P.S. Sorry for answering my own question but this piece of code might help someone.contenteditable attribute, but does not work with