From 63079c992c454f11ce2a6f4e7a03bbd76d246425 Mon Sep 17 00:00:00 2001 From: quenousimporte <76260127+quenousimporte@users.noreply.github.com> Date: Fri, 27 Jan 2023 15:46:25 +0100 Subject: [PATCH] added: toggle spell check on f7 fixed: editor size when changing note --- main.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 45346e1..1bcc57e 100644 --- a/main.js +++ b/main.js @@ -285,6 +285,12 @@ var commands = [ action: save, shortcut: "ctrl+s", allowunsaved: true +}, +{ + hint: "Toggle spell check", + action: togglespellcheck, + allowunsaved: true, + shortcut: "F7" }]; var snippets = [ @@ -319,6 +325,11 @@ var snippets = [ cursor: 0 }]; +function togglespellcheck() +{ + md.spellcheck = !md.spellcheck; +} + function showinfo() { var tags = gettags(currentnote); @@ -1571,7 +1582,7 @@ function deletenote() { var trash = JSON.parse(window.localStorage.getItem("trash")) || []; trash.push(currentnote); - + window.localStorage.setItem("trash", JSON.stringify(trash)); localdata = localdata.filter(n => n != currentnote); @@ -1824,7 +1835,10 @@ function bindfile(note) preview.innerHTML = md2html(getnotecontent()); resetfolds(); + + md.style.height = "0px"; resize(); + setpos(note.pos || 0); // to improve...