JSFiddle - React, Tailwind, and code Playground

by kasperfish

HTML

<div id="preview"></div>
<textarea id="mytextarea"></textarea>

CSS

#preview{
    color:blue;
    width:200px;
    height:100px;
    border:1px solid black;
    
}
#mytextarea{
    width:200px;
    height:100px;
    
}

JavaScript

$(function() {

    $('#mytextarea').bind('input propertychange', function() {

      text=$("#mytextarea").val();
      $('#preview').html(text);

    });
    
    
});