From a2d174665b995d0a28c69e7b5894a9dd289afd4b Mon Sep 17 00:00:00 2001 From: azivner Date: Mon, 28 Aug 2017 21:41:04 -0400 Subject: [PATCH] resetting the editor after note load - not complete solution because ctrl-z will revert to initial editor state --- static/js/note.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/static/js/note.js b/static/js/note.js index b3a642ef0..a1c32f8cc 100644 --- a/static/js/note.js +++ b/static/js/note.js @@ -162,6 +162,9 @@ function loadNote(noteId) { noteChangeDisabled = true; + // Clear contents and remove all stored history. This is to prevent undo from going across notes + $('#noteDetail').summernote('reset'); + $('#noteDetail').summernote('code', noteText); document.location.hash = noteId;