I’m using TinyMCE editor version 3.5 with jQuery. I’m having problem when I’m trying to change the content of the editor. I’m receiving some content from AJAX request and then I want to put it in the editable area. So I write:
#('#my-textarea-id').html(ajax_result);
// OR
#('#my-textarea-id').val(ajax_result);
It works fine the first two times I use it, but after that it doesn’t change and stays on first selected value. It’s very strange. What may cause the problem?
You need to use
tinymce.get('#my-textarea-id').setContent(ajax_result);