JSFiddle - React, Tailwind, and code Playground

HTML

<div id="element">
        <p>Some text</p>
        <p>Some text</p>
        what?
        <span>hello</span>
    </div>
    <button>Click Me</button>

JavaScript

$("button").click(function(){
        $("#element").html("<textarea>"+$("#element").html()+"</textarea>");
    });