JSFiddle - React, Tailwind, and code Playground
HTML
<textarea id="text">Type <b>HTML</b> here...</textarea><br>
<iframe id="frame">
JavaScript
$( function () {
var $text = $( '#text' );
var doc = $( '#frame' )[0].contentWindow.document;
var $body = $( 'body', doc );
var hot = function () {
$body.html( $text.val() );
};
$text.keyup( hot );
hot();
} );