I just noticed this problem in the interop database project. Thought it was my new code that messed up but it was actually there all the time!!!
- If I repeatedly edit the text using the same tinyMCE instance, after the second time. The textarea fails to be updated with the text…. as a result $(“#textarea_id”).val() will give you old value!!!!
- Having realised that my code initTinyMCE every time someone clicks the edit button. I came up with this solution:
if (typeof(tinyMCE) != "undefined") // ="object" means alreaedy init'd
// now check if this iid is already init'd
if ($.inArray($("#issuesField" + iid).tinymce(), tinyMCE.editors) == 0) // found, this one already init'd
return; // to avoid multi-init causing textarea not updated problem
// my code to actually init the tinyMCE instance