From 0c34dcfb377c899f93302d507deffc1809be692f Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 3 Jun 2008 08:15:39 +0000 Subject: [PATCH] Enable autosave for fullscreen mode. Props azaozz. fixes #7069 git-svn-id: https://develop.svn.wordpress.org/trunk@8037 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/js/autosave.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/wp-includes/js/autosave.js b/wp-includes/js/autosave.js index 53060abe49..2f779203c0 100644 --- a/wp-includes/js/autosave.js +++ b/wp-includes/js/autosave.js @@ -154,8 +154,13 @@ var autosave = function() { doAutoSave = false; /* Gotta do this up here so we can check the length when tinyMCE is in use */ - if ( rich ) { tinyMCE.triggerSave(); } - + if ( rich ) { + var ed = tinyMCE.activeEditor; + if ( 'mce_fullscreen' == ed.id ) + tinyMCE.get('content').setContent(ed.getContent({format : 'raw'}), {format : 'raw'}); + tinyMCE.get('content').save(); + } + post_data["content"] = jQuery("#content").val(); if ( jQuery('#post_name').val() ) post_data["post_name"] = jQuery('#post_name').val();