tags:

views:

343

answers:

1

I am using the jQuery plugin from the jQuery build of TinyMCE.
This simplified code initializes the editor:

$('textarea.tinymce').tinymce({
    script_url : '../js/libraries/tiny_mce/tiny_mce.js'
});

This loads tiny_mce.js via AJAX. I have code that I want to run once this file is loaded.
I essentially want to specify a callback function, but there is no mention of this in the documentation for the plugin.

Any ideas? I would be up for adding the functionality if it is not there but I cannot find an uncompressed version of the plugin.

+1  A: 

Is the oninit an option? Looking at the minified source, the oninit runs after the ajax call comeback and the init runs.

$('textarea.tinymce').tinymce({
    script_url : '../js/libraries/tiny_mce/tiny_mce.js',
    oninit: function() { alert("Loaded"); }
});
Nick Craver
Thanks a lot, I could not get that much out of looking at the minified source
SomewhereThere
Thanks also, I was looking for this functionality but couldn't find it in their tutorial.
Marcus Whybrow