I am loading TinyMCE rich text editor in a jQuery modal dialog. The problem is if I initialize when window loaded then the alignments are not proper. It works fine if I initialize inside the modal window open function. But the issue is when the modal window opened for second time it is again getting initialized. So I can see two editors.
The executeCommand from TinyMCE 3.X doesn't work in 4.X to destroy the editor when closing the modal window. I want to know how to unload the TinyMCE editor or how to detect if the TinyMCE editor is already loaded so that I can skip loading for the second time.
//tinymce.execCommand('mceRemoveControl',true,'content'); - I used with TinyMCE 3.X to unload
Thank you for the answers.