JSFiddle - React, Tailwind, and code Playground
by Ronny
HTML
<textarea id="head"></textarea>
<textarea id="body"></textarea>
<button id="update">Go</button>
<iframe id="i"></iframe>
CSS
iframe {width: 300px; height: 200px; border: 1px solid red;}
#code {width: 100%; height: 100px;}
JavaScript
$('#update').click(function(){
var i = $('#i').contents().find('html');
i.find('head').html($('#head').val());
i.find('body').html($('#body').val());
});