Skip to content

Commit

Permalink
Vide le stockage local lors de l'envoi avec Ctrl+Entrée
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnaud-D committed Jun 20, 2022
1 parent 8784520 commit a32a2fc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion assets/js/editor-new.js
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,10 @@
window.editors[this.id].previous_value = ''

function submit(cm) {
if (cm.getValue() !== '') formEditor.submit()
if (cm.getValue() !== '') {
localStorage.removeItem('smde_' + mdeUniqueKey)
formEditor.submit()
}
}

easyMDE.codemirror.addKeyMap({
Expand Down

0 comments on commit a32a2fc

Please sign in to comment.