jbt / markdown-editor

Live (Github-flavored) Markdown Editor
http://jbt.github.com/markdown-editor
ISC License
2.82k stars 643 forks source link

Is there a plan to add js-deflate feature in the new version? #81

Closed athrunsun closed 5 years ago

athrunsun commented 6 years ago

The original version (on branch mdedit) has a very useful feature provided by js-deflate, which can gzip data to make it fit in URLs (see it in action here).

It's useful especially when you close your browser tab/window by accident, when you can really bring back everything by Ctrl + Shift + T (Chrome/Firefox). In this case it is not just reopening a closed tab, but restore markdown data because everything is hashed and appended to the URL!

So, is there a plan to add this feature in the new version?

aero31aero commented 6 years ago

Hey! That was a nifty feature indeed. However, since it was being computed on every keystroke, when you had a document with around, say, 10k characters or so, the lag was becoming noticeable and the editor felt too slow to work with.

As of now, I've pushed that feature into the share button.

image

For your use case, what do you feel about an autosave feature that executes every couple of minutes or by the number of keystrokes.

athrunsun commented 6 years ago

@aero31aero Thank you for your reply!

The lag is a drawback indeed...

I love the "autosave" idea, and save every couple of minutes makes sense.