JSFiddle - React, Tailwind, and code Playground
by ksoncan34
HTML
<textarea id="test"></textarea>
<button onclick="paste()">Paste</button>
CSS
textarea {
width: 300px;
height: 400px;
}
JavaScript
async function paste() {
debugger;
const text = await navigator.clipboard.readText();
document.getElementById('test').value = text;
}