Autosave with CKeditor

May 20, 2013 at 2:08 PM
Is there any was to have to implement an autosave feature ?
For users typing a long blogpost, this would be useful if their user session dies out
May 25, 2013 at 4:53 PM
i have a working plugin that does auto saving. But its the same as with the ML Content without the Module this feature would not work correctly.

Because there is no way that the editor knows when the content is correctly saved and it does not need to saved temporary.

I would like to add this feature, but until is find a solution for that problem there is no way to add it.
May 25, 2013 at 5:55 PM
Hi, thanks for your reply,

I do not understand what do you mean by: "without the Module this feature would not work correctly."
Without which module ?

How does your working plugin function ? Can we try it ?


I am thinking that this could be addressed like this: an html user session with user id and url and datetime. We could a create a new table for this dbo.Ckhtmlsav
the content is versioned every five minutes until the user actually saves the data. When saving the data, we can keep the last 1-3 versions just in case.

Imagine a user lost his connection, his session timeouted, when going back to the page where he was the html editor would retrieve the last content saved to the db.
May 25, 2013 at 6:28 PM
Ok this is funny, I was writing what the problem is then I tought about it, and solved it. I will upload a beta version tomorrow. My solution uses HTML5 local storage no need to create extra db tables. And saving multiple versions seems way to complicated if the content is saved every lets say 10-30 ( will be configurable via the settings) then only one version is needed.
May 26, 2013 at 7:44 AM
You can try it out now. 2.00.5 RC 3 is online.

How the Plugin works
The Plugin saves the content every 25 seconds (can be defined in the Config - autosave_delay), but only when the content has changed.

And when the Editor Page is reloaded and auto saved content is found and its different from the content loaded with the editor the user will be asked if the auto saved content should be loaded instead.
May 31, 2013 at 6:20 PM
These is nice! Seems to work from what I can tell from so far.
Jul 5, 2013 at 1:37 PM
Can you suggest some testcase scenarios for this ?

If the browser crashes (or closed by accident), or the connection is lost and the user relogins.).. would it keep the content in memory?
Jul 5, 2013 at 1:52 PM
gdemotchkine wrote:
Can you suggest some testcase scenarios for this ?

If the browser crashes (or closed by accident), or the connection is lost and the user relogins.).. would it keep the content in memory?
Yes in That Casey You describe the Data is Safes in the Browser Local Storage Database.