To prevent users from loosing content, you can use the Autosave feature. It enables you to save data periodically and automatically as the data is sent to the server when content is altered within a document, or based on time intervals.
Another powerful feature that can help is watchdog - a tool that protects you from data loss in case the editor crashes. It saves your content just before the crash and creates a new instance of the editor with your content intact.