AutoSave

Short Description

When you need to edit a long wiki Using MoinMoin, it's a painful experience. Maybe you have encountered the bad situation when suddently the OS or web browser crashed. You will Find the contents you have editing for a long time passed away when you recover from OS accident rather than MoinMoin.To keep the safety of the content you are writting, You need to save and back to edit every several minutes. It's painful! why not let the MoinMoin keep it safe and automatically?

Inspired by Microsoft Word's auto-save feature and google gmails similar feature, This project try to add the AutoSave Feature to MoinMoin either in GUI or in Text Editor.


Implementation Consideration

The implementation seems natural, MoinMoin will auto-save the editing contents every few minutes. The MoinMoin edit page’s underlying JavaScript function will request server to save the edit content as a draft every few minutes, the server get the request, do the draft save process, return the status.

If the client crash in the middle of wiki editing process because of OS crash or Web browser crashed, when user reconnect to the MoinMoin server, he will find the edit draft be there. User can choose to recover from the draft or discard it.

The AutoSave will keep the most recent changed draft history in server sides, the number of draft save copy can be changed by user.

When the user reconnect to the MoinMoin, he will find the previously auto-save content be there. The server will post the draft to the client in this condition.

The auto-save feature will be integrated in both TEXT and GUI editor.

AJAX Integration

AJAX technology gives the user fantastic experience of web, it give user better interaction and more responsiveness. This project will also integrate AJAX to smooth the auto-save page. The MoinMoin GUI and TEXT editor will need to change, including change some underlying JavaScript, add a “Draft saving” button etc. The server sides also need to add some AJAX Framework to do the request processing. We plan to use XML or user-defined protocol to do the interaction of client and server; it depends on implementation and result of test.

When Using AJAX, to keep the same effect in both IE and Mozilla-like browser, we need to do the different consideration of Client side JavaScript program.

The AJAX need the browse to enable the JavaScript feature, if JavaScript is diabled, the auto-save feature will flush the editor in the traditional way, also it will show a suggestion “To gain the better effect, please enable the JavaScript of web browser”.

The server will keep the draft until the user publishes the editing content. Then the server will delete the older content of draft.

User Interface

Draft process interface:

AutoSave Parameters:Multi-User editing Environment may be a hard one, if AutoSave save the draft according to editing content, when two editor edit the same page and do AutoSave in the same time, what will happen?

This project plan to save the draft by edit page and editor to solve the problem

It needs good suggestion!


Discussion

  1. There is no need for AJAX in this case, just asynchronous JS will be necessary.
  2. Moin already has an auto-save feature. It is just hidden and not well documented, the timer is missing as well. I guess you do not know it. Find it, evaluate it and base your idea on it :-) -- AlexanderSchremmer 2006-05-07 18:31:48

  3. Thanks for your Suggestion! I have checked the MoinMoin code and documents, You are right. Currently MoinMoin can do this job by Using “Preview”, it will save the contents to YourName/MoinEditorBackup.perhaps AJAX integration of wiki show, TEXT/GUI editing to avoid the full screen refreshing is a good idea. I plan to integrate the wikiwyg Editor to MoinMoin,and add this AutoSave feature as an Editor improvement Feature. -- Ma Yuan 2006-05-08 13:50:25 Nice! -- AlexanderSchremmer 2006-05-09 21:33:22

  4. In moin-1.8.8 the path to the draft file is: ./wiki/data/cache/wikiconfig/drafts. If you create a new page with the same name, you are asked about loading your draft.

  5. Another option would be to autosave text area content into browsers local storage(HTML 5). -- Martin Vuk 2024-04-29 06:05:02

Partly this will be solved after merging of http://hg.moinmo.in/moin/2.0-storage-editor-amartani


CategoryFeatureRequest CategoryForMoin2

MoinMoin: FeatureRequests/AutoSave (last edited 2013-10-14 12:25:06 by 2001:1470:fffd:10a7:c62c:3ff:fe1c:c191)