Skip to content
franck34 edited this page Oct 13, 2012 · 1 revision

Very basic code :

  document.body.onpaste = function(event) {
    if (!event.clipboardData.types) return;
    var data = event.clipboardData.getData('text/plain');
    if (!data) return;
    alert('Pasted data: '+data);
  }