JSFiddle - React, Tailwind, and code Playground

by Matt Ball

HTML

<a href="#" id="den">DEN</a>
<div id="test">
<p id="x">I am doing good</p>
</div>

JavaScript

$("#den").on("click", function () {
    $("#x").html(function (i, oldHtml) {
        return '<textarea type="text">'+oldHtml+'</textarea>';
    });
});