JSFiddle - React, Tailwind, and code Playground
by Qpirate
HTML
<script src="http://www.tinymce.com/js/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script src="http://tinymce.com/js/tinymce/jscripts/tiny_mce/jquery.tinymce.js"></script>
<button type="button" id="btnShow">
shw</button>
JavaScript
$(function ()
{
tinyMCE.init({ mode: 'none' });
$('#btnShow').click(function ()
{
var dlgComments = $('#dlgInternalComments');
if (dlgComments.length == 0)
{
dlgComments = $('<div/>').attr('id', 'dlgInternalComments'),
txtAreaComments = $('<textarea/>').attr('id', 'txtInternalComments').appendTo(dlgComments);
dlgComments.dialog({
open: function ()
{
if ($('#txtInternalComments_parent', $(this)).length == 0)
{
var ddd = {mode:'none'}; //$.extend({}, Globals.RichTextBox, { mode: 'none' });
txtAreaComments.tinymce(ddd);
}
},
buttons: {
'Ok': function ()
{
$(this).dialog('close');
},
'Cancel': function ()
{
$(this).dialog('close');
}
}
});
}
else
{
dlgComments.dialog('open');
}
});
});