JSFiddle - React, Tailwind, and code Playground

HTML

<div contenteditable='true'><span style="color: blue">Test</p></div><br />

Show textarea here: <span id="show"></span>

JavaScript

$("#show").html($("div").html());