I am using Tinymce (with jQuery) in a project that I am working on; we use a rich text editor for users to enter information; however, sometimes when loading pages Firefox and Chrome detect a "tinymce is not defined" error (sometimes in different lines of code), while other pages will load just fine. What is strange is that it works fine with IE.
Here is some code that I use:
view.find('textarea.rich-text').each(function () {
$(this).tinymce( );
});
And later
_variable.find("#summary").tinymce().setContent(content);
An error occurs on this line (sometimes). It seems to me that the problem is related to loading, although the tinyMCE plugin is initialized about 5,000 lines before this line.
Refresh . At the moment, I have managed to "solve" the problem with setTimeout, but this seems like a very ugly way to do it.