JSFiddle - React, Tailwind, and code Playground
HTML
<div>This is a div</div>
<textarea></textarea>
CSS
.red { background: red }
JavaScript
$(document).ready(function() {
$("div").on("click", function() {
$("textarea").text($("div").text());
});
});