Enrico
Enrico

Reputation: 6246

SimpleMDE: how to remove the autosave value

I'm using SimpleMDE to add to my page a Markdown Editor. In the settings, there is an option for the autosave. When the user types something in the editor, periodically the script saves the changes in the Local storare of the browser. The name of the key can change but the key starts always with smde_

enter image description here

If I want to remove this key from the Local Storage I don't know how to do it. Is there a function in the SimpleMDE to remove this key?

Upvotes: 0

Views: 83

Answers (1)

hshtgbrendo
hshtgbrendo

Reputation: 31

Use the clearAutosavedValue method:

var simplemde = new SimpleMDE();

simplemde.clearAutosavedValue();

Upvotes: 0

Related Questions