One of the first features Ephox is developing for EditLive! 7.0 is autosave - ensuring content authors never lose their data even if the computer crashes, the network fails or if they close the browser accidentally.
How It Works
Just like Microsoft Word, EditLive! will regularly save a copy of the document to disk in the background. This ensures that the content is safely stored, even if submitting the form fails for whatever reason. Authors simply create content like they normally would. When the author is finished they use the normal save or submit button to post the content back to the server.
If for any reason the content doesn’t get submitted back to the server it will still be saved on the local disk. The author simply goes back to edit the same content item and EditLive! will detect unsaved versions and prompt the author to restore them.
Clicking on the restore button shows the author the content that has been automatically saved. Clicking on one of the versions will preview it in the editor so authors can easily find the best version to restore - normally the most recent one.
Finally, the author clicks “Restore” and their valuable content is back in the editor ready for them to continue editing or save to the server. If for some reason the autosave toolbar doesn’t appear but the user still wants to restore previous content, they can choose the “Restore from Autosave…” menu item to access the same dialog.
How to Enable Autosave
First grab the latest version of EditLive!. The autosave in EditLive! works automatically with any back end system, without changing the way the system saves or loads content. All that’s required is two simple changes required to the EditLive! configuration file.
If you are using the sample_eljconfig.xml, it will already contain these changes.
Load the Plugin
Under the <plugins> element, add a new element to load the autosave plugin:
<plugins> … <plugin name=”autosave” /> … </plugins>
Add the Restore from Autosave Menu Item
You can add this menu item to any menu you want - in the sample configuration it’s under the “File” menu:
Autosave Developer Guide