JSFiddle - React, Tailwind, and code Playground

HTML

<form>
    <input id="copyFrom" readonly="true" type="text" value="copy and paste this into the other input"/>
    <br /><br />
    <input id="pasteTo" type="text" value="default"/>
</form>

CSS

#copyFrom{
}
#pastTo{
}

JavaScript

$(document).ready(function(){
    $('#copyFrom').click(function(){
        $(this).select();
    });
    
    $('#pasteTo').click(function(){
        $(this).select();
    }).bind('paste',function(){
        alert($(this).val());
    });
});