Permalink
Find file Copy path
6d90ef5 Apr 27, 2013
1 contributor

Users who have contributed to this file

37 lines (33 sloc) 680 Bytes
<DOCTYPE html>
<html>
<head>
<title>Clipboard</title>
<style>
body {
padding: 50px;
}
textarea {
padding: 15px;
}
</style>
</head>
<body>
<script src="build/build.js"></script>
<textarea>Hello world</textarea>
<script>
var Clipboard = require('clipboard');
var clip = new Clipboard(window);
clip.on('paste', function(e){
e.items.forEach(function(item){
console.log(item);
});
});
clip.on('cut', function(){
console.log('cut');
});
clip.on('copy', function(e){
console.log('copy');
});
</script>
</body>
</html>