Search code examples
javascripttinymce

How to tell if tinyMCE has been initated?


I initiate the tinyMCE like this in multiple tabs of JQuery:Tab. But I find to init tinyMCE multiple times yields readonly text areas. Thus I wish to check if tinyMCE is already initated. Is there a method like isInitated() or something similarly convenient there?

tinyMCE.init({
    mode : "textareas",
    theme : "simple",
    width : "500",
    height : "300"
});

Solution

  • I know this question is old, but...in case someone is still looking for the holy grail:

    in tinymce 4, you can pass a callback to tinyMCE.init like so:

    tinyMCE.init({
      //your regular parameters here...
      setup: function(editor) {
        editor.on('init', function() {
          //all your after init logics here.
        });
      }
    });