I am using the TinyMCD plugin in the Dialog plugin.
Everything works fine, until I set the dialog's modal parameter to true. When I am doing that, the TinyMCE textarea works fine only the first time the dialog is opened and then becomes read only.
Here is the example of my code:
tinyMCE.init({ mode: 'none' });
var dlgComments = $('#dlgInternalComments');
if (dlgComments.length == 0)
{
dlgComments = $('<div/>').attr('id', 'dlgInternalComments'),
txtAreaComments = $('<textarea/>').attr('id', 'txtInternalComments').appendTo(dlgComments);
dlgComments.dialog({
height: 300,
width: 800,
modal:true,
open: function ()
{
if ($('#txtInternalComments_parent', $(this)).length == 0)
{
var ddd = {mode:'none'}; //$.extend({}, Globals.RichTextBox, { mode: 'none' });
txtAreaComments.tinymce(ddd);
}
},
buttons: {
'Parse': function ()
{
processAuthorsParagraph();
$(this).dialog('close');
}
}
});
}
else
{
dlgComments.dialog('open');
}
I don't know how to fix this issue. I have tryed some suggestions from here: http://www.codestumps.com/2011/05/adding-tinymce-into-a-jquery-ui-dialog/ but I haven't found the solution.
If you can help me, thank you very much.