Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

clipboarddata.getdata html

<script type="text/javascript">
    $('.historyText').live('input paste', function(e) {

        var paste = e.clipboardData && e.clipboardData.getData ?
        e.clipboardData.getData('text/plain') :                // Standard
        window.clipboardData && window.clipboardData.getData ?
        window.clipboardData.getData('Text') :                 // MS
        false;

        alert(paste);
    });</script>


or

document.addEventListener('paste', function(e) {
  var html = e.clipboardData.getData('text/html');
  // Whatever you want to do with the html
}

or

$(document).bind('paste', function(e) {
    var clipboardData = e.originalEvent.clipboardData;
});
 
PREVIOUS NEXT
Tagged: #html
ADD COMMENT
Topic
Name
6+4 =