Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Differentiate between regular autosave delay and submit autosave delay #139

Merged
merged 2 commits into from
Jan 25, 2020

Conversation

Situphen
Copy link

Differentiate between :

  • the "regular" autosave delay (saving the content every x seconds) with options.autosave.delay
  • the "submit" autosave delay (saving the content if we think the submit as failed) with options.autosave.submit_delay

I'm working for a project (https://github.com/zestedesavoir/zds-site) where we put the options.autosave.delay at 1 second because we want to save the content each 1 second. But since the submit request takes more than 1 second EasyMDE thinks the submit as failed so it saves the content in the localStorage.

I didn't find a better name than autosave.submit_delay, any suggestion is welcome.

This might be considered as a breaking change. If it is the case, we could maybe use easyMDE.options.autosave.submit_delay || easyMDE.options.autosave.delay || 10000 ?

Copy link
Owner

@Ionaru Ionaru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice suggestion 👍

One thing is that I would like to use the non-breaking option.

@Ionaru Ionaru merged commit 9b9edec into Ionaru:master Jan 25, 2020
@Situphen Situphen deleted the delay branch January 25, 2020 22:42
Ionaru added a commit that referenced this pull request Jan 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants