Hello everybody, I'm not able to update a tiny mce text editor content in ajax (using php). Weirdly, if i update any div, it performs perfectly, but not in the case of the editor. I'm confused as to what i'm doing wrong here. Can you guys please help me? This is my code... if($("body") && go_url) { tinyMCE.triggerSave(); var xmlHttp= new Ajax.Updater("body",go_url, { parameters:Form.serialize('import_but'), onLoading:function(){loading_in();}, onLoaded:function(){loading_out();}, onComplete:function(request) { if(xmlHttp.responseIsFailure( )) { alert('failed'); } else { tinyMCE.get('body').setContent(request.responseText); } } }); } Code (markup): "body" is the id of the text area (that is converted into the tiny mce instance). Again, I tested with a normal, plain div and it worked fine, but not with the editor. Am i doing anything wrong??? Please help...
Hmmm... Oops TinyMCE JS is too Complicated and heavy to understand for me! Better you can have a look in their forums for it
Never mind, i found out the problem. It's just that the else part of the oncomplete state was not working for some reason. When i place the editor update code outside the if-else checking, it worked.
Umm... Happy t know that you solved that BTW: I am just get into TinyMCE but i love that CKeditior which is even similar to that
Yes, CKeditor is perhaps the extension of FCK and has a great look and feel. But i already implemented tintmce in all parts of my projects. So it should have been a real hard ROLLBACK ..
If you use Firebug to see if the tinyMCE.get('body').setContent('helo'); works/sets the value fine. It is needed to know whether we set the value by the above methods. If yes then it should work in ajax.
Oops! really i don't know about that! Seems it have all the things that a human need to publish a HTML Page in Web