JSFiddle - React, Tailwind, and code Playground

by Cameron Bernhardt

HTML

<div id="bio">Lorem ipsum dolor amet</div>
<br/>
<button onclick="editBio(bio)">Edit</button>

JavaScript

function editBio(bio) {
    document.getElementById("bio").innerHTML = '<form action="profile.editbio.php" method="post"><textarea cols="40" rows="10" name="bio" id="bio" maxlength="275">' + bio.innerHTML + '</textarea><br><input type="submit" value="Update"></form>';

}