JSFiddle - React, Tailwind, and code Playground

by techunter

HTML

<p><a id="showDialog" href="javascript:void(null);">Open</a></p>
 
<div id="dialog-modal" title="Basic modal dialog" style="display: none;"></div>

JavaScript

$('#showDialog').click(function(e)
{
    e.preventDefault();
    $("#dialog-modal").dialog(
    {
        width: 600,
        height: 400,
        open: function(event, ui)
        {
            var textarea = $('<textarea style="height: 276px;">');
            $(textarea).redactor({
                focus: true,
                autoresize: false,
                initCallback: function()
                {
                    this.set('<p>Lorem...</p>');
                }
            });
        }
     });
});