JSFiddle - React, Tailwind, and code Playground

HTML

<html>
<body>
<pre></pre>
<script>
	let elem = document.querySelector('pre');
	document.addEventListener('paste', function(e) {
		elem.innerText = "";
		for (let type of e.clipboardData.types) {
			let pasteData = e.clipboardData.getData(type);
			elem.innerText = elem.innerText + `Type: ${type}
Data: ${pasteData}
-----
`;
		}
	});
</script>
</body>
</html>