SimpleMDE: how to remove the autosave value

34 views Asked by At

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?

1

There are 1 answers

0
hshtgbrendo On

Use the clearAutosavedValue method:

var simplemde = new SimpleMDE();

simplemde.clearAutosavedValue();