Using jQuery version of tinyMCE.
I have a content page where there can be many pieces of text that can be clicked. Therefore, when the user clicks on one of these elements, we want to replace the DIV with text with a tinyMCE instance containing the text.
So, initially I called it
$.getScript('/js/tiny_mce/jquery.tinymce.js', function() {
$(dummyTextarea).tinymce({
...tinyMCE initialise stuff
})
and that was in the onclick div. But this, of course, is very awkward, as it will execute an ajax request, etc. And get tinymce again and again every time something clicks. So instead, I want to initialize one tinyMCE instance when the page loads, and then onclick, just set the active text area as my already loaded tinyMCE instance. I can't figure out how to do this with the jquery tinymce version. Is it possible? Any suggestions?
Dave source
share