added: toggle spell check on f7

fixed: editor size when changing note
This commit is contained in:
quenousimporte 2023-01-27 15:46:25 +01:00
parent b8293768b5
commit 63079c992c
1 changed files with 15 additions and 1 deletions

14
main.js
View File

@ -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);
@ -1824,7 +1835,10 @@ function bindfile(note)
preview.innerHTML = md2html(getnotecontent());
resetfolds();
md.style.height = "0px";
resize();
setpos(note.pos || 0);
// to improve...