Можно вот так.
<input type="text" id="my-input" name=""/>
<img width="100%" id="my-img" src=""/>
<script type="text/javascript">
window.addEventListener('load', function(e) {
let my_input = document.getElementByID('my-input');
my_input.addEventListener('keyup', function(e){
if( e.keyCode == 13 ){ // ENTER
console.log( my_input.value );
}
});
my_input.addEventListener('paste', function(e) {
let reader = new FileReader();
let pasteData = e.clipboardData.files; // .getData('file'); .getData('text');
// e.originalEvent.clipboardData.types; // Array of Data Types
reader.onload = function (e) {
let raw_data = e.target.result;
$('#my-img').attr('src', raw_data);
}
reader.readAsDataURL( pasteData[0] );
});
});
</script>