JSFiddle - React, Tailwind, and code Playground
HTML
<h1>Input</h1>
<textarea id='Template' style="width: 98%;">
<p>Hello World !!</p>
</textarea>
<h1>Output</h1>
<iframe id="TemplateView" style="width: 98%;"></iframe>
JavaScript
$(function() {
var template = $('#Template'),
view = $('#TemplateView'),
update = function() {
view.contents().find('html').html(template.val());
};
$(template ).on('keyup change', update);
update();
});