From c22777ce38ecd89331d11a2d956cc6a81da65070 Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Mon, 15 May 2023 14:49:52 +0200 Subject: [PATCH] added: feature to quickly add text in todo changed: line height in mingw theme --- main.js | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index edb8a02..d9e227b 100644 --- a/main.js +++ b/main.js @@ -61,7 +61,7 @@ var themes = fontfamily: "Lucida console", fontsize: "13px", fontcolor: "black", - lineheight: "100%", + lineheight: "110%", accentcolor: "rgb(177,54,186)" }, Default: @@ -318,6 +318,10 @@ var commands = [ { hint: "Download all vaults", action: downloadallvaults +}, +{ + hint: "Insert text in todo", + action: inserttodo }]; var snippets = [ @@ -981,6 +985,27 @@ function downloadnotes() }, 500); } +function inserttodo() +{ + filter.placeholder = "Text..."; + filter.value = ""; + filteredlist.hidden = true; + searchdialog.hidden = false; + filter.focus(); + filter.select(); + + filter.onkeydown = function() + { + if (event.key === "Enter") + { + event.preventDefault(); + searchdialog.hidden = true; + getnote("todo").content += "\n" + filter.value; + datachanged(); + } + } +} + function downloadallvaults() { var data =