Hi everyone.
Using tinyMCE jquery version.
I have a content page where there could be many pieces of text which are clickable. So when a user clicks on one of these elements, we want to replace the DIV with the text with a tinyMCE instance containing the text.
So originally, I had it calling
$.getScript('/js/tiny_mce/jquery.tinymce.js', function() {
$(dummyTextarea).tinymce({
...tinyMCE initialise stuff
})
and that was on the onclick of the div. But that of course is very clunky, as it will do an ajax request etc. and get tinymce again and again each time something is clicked. So instead, I want to initialise one tinyMCE instance on page load, and then onclick, just set the active textarea to be my already loaded tinyMCE instance. I can't seem to figure out how to do that with the jquery tinymce version. Is this possible? Any suggestions?