Apparently MooEditable doesn't update the hidden textarea when you type in WYSIWYG mode.
On Dec 23, 3:10 am, reverseproductions <[email protected]> wrote: > Hi. I am relatively new to programing and even newer to MooTools. I > love the framework and tutorials I've found so far. From my research > MooEditable was the best wysiwyg I found on the net. I got it working > with my CMS / blog so easily. I've only now run into a minor problem > and that is with trying to have an AJAX request in the background > that > auto saves my form data every few minutes (so in the event of browser > crash, connection drop ppl don't loose their posts) > I used this piece of script I found somewhere to achieve that > // Auto Save Classes > var request = new Request({ > url: 'actions/blog_post_autosave.php', > method: 'post', > onComplete: function(response) { > $('log_res').set('html',response); > el.set('tween', {duration: 'long'}); > el.tween('opacity', 1); > } > > }) > > var sendForm = function() { > request.send($('blogPost')); > > } > > sendForm.periodical(10000); > Independently it works fine but when I try to combine it with > MooEditable it does seem to transfer the <textarea> data that > MooEditable is attached too, unless I toggle it to "code" view. Here > is my MooEditable code: > window.addEvent('load', function(){ > mooeditable = $('body').mooEditable(); > // Post submit > $('blogPost').addEvent('submit', function(e){ > alert($('body').value); > return true; > }); > }); > // Ajax submit > function updateContent(){ > mooeditable.saveContent(); > > } > > I'm sure it's just an error with my code somewhere... as I said I'm a > newbie, but just in the event it's a big with MooEditable I figured > I'd do a post. Any help would be greatly appreciated. > Cheers, Brennan
