Simple Autosave and Recovery for Forum WYSIWYG Editors

Well, after causing Don Cragun to lose some replies when working on a few feature, I decided to create a simple autosave / recovery program that will autosave locally on key (key stroke) changes (and mouse clicks as well).

NOTE.

  • Works well in Chrome
  • Works OK in Safari, but is not reliable like Chrome.
  • Does not seem to work in FF due to all their unwanted "blocking" which I cannot turn off.

You can now click this "cloud upload" icon (image below) to load / recover text into the editor on network crash, abrupt browser close, computer crash, etc.

It will not recover what you delete with your keyboard because this simple script saves all your keystrokes locally in local browser storage.

Currently works on desktop, but I will port to mobile soon.

It's simple, but very cool and it works and it works across forum editors (advanced and quick reply editors) and if you close your browser and forget to save, when you open your browser again, it's there.

Press 200 "thank you" for this very cool feature! :slight_smile: Or become Neo's Patreon sponsor and send me your spare change monthly and I'll keep adding new features like this :slight_smile: You will also get another colorful "sponsor's badge" it you do!

You can also you this feature as a faux cut-and-paste between your posts and replies as well. Experiment and have fun with it! :slight_smile:

3 Likes

I just found a new use for the Simple Autosave feature.

While working on a reply, I was doing other tasks, and ended up closing a bunch of open tabs in my browser, and then accidentally closed the tab of the reply I was working on!

LALAAAA... Simple Autosave and Recovery to the rescue! No data lost in the post I was working on!

Hey!

So far, I have tested and it works great in Chrome, but is not working as well as it should in Safari.

Will try FF next.

Update:

  1. Chome (Works as Expected)
  2. Safari (Works but NOT Updating as Expected - Not as reliable as Chrome).
  3. FF (Local Storage seems blocked. This is why I am not a fan of FF).

Bottom Line:

If Autosave and Recovery is important to you, use Chome!

If you a Safari user, then it seems to work OK, but not as good as Chrome.

FF, well... it seems hopeless!!

Cheers!

OK.. I have added more code logic to save the editor text based on a set interval (1 second) when the editor text is different than the autosaved editor text in addition to keyboard changes because using only the keyboard change method is not reliable on Safari.

Also, I have completly disabled autosave and recover for Firefox because it does not work regardless. It seems Firefox marches to the beat of it's on non-standard drum:

  • Chrome - Working Good
  • Safari - Working Good
  • Opera - Working Good
  • Firefox - Disabled (Does not seem to support the same web standards for using local browser storage).
  • Edge - No MS Edge for Mac [Did not test].

Honestly, from a web dev perspective, Chrome is by far the superior browser compared to Safari and Firefox; and Safari is much better than Firefox.

If you are a Firefox user and are interested in reliable, advanced browser features, switch to Chrome :slight_smile: and if not Chrome, Safari ... please.

2 Likes

Just used the recovery. Great thing. Google-chrome browser with plugin cVim
restored one line, but still nice

1 Like

Cheers.

It will restore an entire page of text.... I was working on a very long post a day ago and accidentally closed out the tab on Chrome.... without autosave and recovery, it would have been gone; but with it, I was able to load the entire post and keep moving on!

:slight_smile:

1 Like

If you accidentally close a tab in Safari, you can restore it with "undo last operation" from the Edit menu (with keyboard shortcut <ctl>-Z ). If you didn't realize what you had done immediately, but you hadn't closed any other tabs in Safari yet, you could also restore the accidentally closed tab with "Reopen Last Closed Tab" from the History menu (with keyboard shortcut <shift>-<command>-T ).

Both of these will often get back all but the last change you made to text in the window you're restoring. But, of course, neither of them always restores what you want.

2 Likes

That's a useful tip Don.

On another MacOS note, I just realized I can cut-and-paste between my Macs!

I had no idea I could do that! It is called "Universal Clipboard":

macOS Sierra: Copy and paste across devices

That is cool too!

1 Like

If you found those useful, here are two others that have saved me lots of frustration a few times...

If you accidentally close a safari session, as long as you don't panic you can recover by restarting safari and selecting "Reopen All Windows from Last Session" from the History menu (note that there is no keyboard shortcut for this selection.

If you closed more than one tab and want to reopen a tab that you closed recently, you can select "Recently Closed" from the History menu and select a site from that list to reopen that site. (There aren't any keyboard shortcuts for this either, but you can use the arrow keys to navigate through the History menu options and through the list of recently closed tabs/windows.) You probably won't recover anything that you had started changing in a page if you get there this way, but it is useful if you closed something you were looking at a few days ago, forgot its address, and want a way to get back to that page again.

Enjoy,
Don

1 Like