Reputation: 243
I have a dynamic application that makes heavy use of javascript and ajax calls. With each ajax request the server returns javascript code. The javascript does first something like $('#contentBox').append('here a lot of html with also an textarea').
After the append is the initialization for the TinyMCE editor. The problem is that this only works when I put also an alert after the initialization code. Thus
$('#editor').tinymce({
// options
});
alert('hello');
But when the alert is not in the code the editor isn't showed at all. How to solve this?
Upvotes: 2
Views: 270
Reputation: 50832
I strongly suggest not to use the jQuery-build of tinymce. It is by far slower than the normal build!!! (it is very slow when typing) I suggest you use the normal tinymce build, but also load the regular jQuery library on the page - this is much more performant. In that case you can use the regular initialization function
tinymce.init({
// options here
});
Upvotes: 0
Reputation: 19998
That is not valid jQuery, try:
$('#editor').tinymce({...});
Upvotes: 1