Redactor Examples
jQuery UI Dialog

Open


<p>
    <a href="#" onclick="showDialog(); return false;">Open</a>
</p>
 
<div id="dialog-modal" title="Basic modal dialog" style="display: none;"></div>
 
<script type="text/javascript">
function showDialog()
{
    $("#dialog-modal").dialog({
            width: 600,
            height: 400,
            open: function(event, ui)
            {
                var textarea = $('<textarea style="height: 276px;">');
                $(this).html(textarea);
                $(textarea).redactor({
                    focus: true,
                    maxHeight: 300,
                    callback: {
                        init: function()
                        {
                            this.code.set('<p>Lorem ipsum dolor...</p>');
                        }
                    }
                });
 
            }
        });
}
</script>