Let’s say you’ve got this sweet little Mootools AJAX page with a tinyMCE textfield. You think “wouldn’t it be awesome to have a ’save now’ button just like WordPress or Google Mail”. Great idea! Have you tried?
It’s not as easy as it should be. A straight AJAX get method won’t grab the content so you go to the tinyMCE site and search. What you find might help but you don’t want to integrate with a plug-in button, you just want to trigger a DB save without reloading the page. What next? Google it?
Good luck. Unless search results have improved recently or you found this blog you are probably SOL. But you found the answer right here!
I’m not going to tell you what to do with the content once you’ve got it set to a variable because if you need that kind of help, you shouldn’t be messing with AJAX yet. Learn to work with a dynamic site first. Here you go…
var tmVal = tinyMCE.get(’ideaExpand’); //get the dump from tinyMCE
var saveVal = etmVal.getContent(); // now go do something with saveVal
Obviously, saveVal now has the content you need to write to your DB. Cheers!










