From ae138a7a48fbefdcd9728b046f9970663a0280a1 Mon Sep 17 00:00:00 2001 From: quenousimporte <76260127+quenousimporte@users.noreply.github.com> Date: Wed, 18 Jan 2023 19:35:38 +0100 Subject: [PATCH] changed: try to improve autosize added: inconsolata fonts in reference changed: back to previous note when typing escape form help page --- main.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 390b6a8..06d54ff 100644 --- a/main.js +++ b/main.js @@ -1071,11 +1071,14 @@ function resize() { if (md.clientHeight > md.scrollHeight) return; - md.rows = (md.value.match(/\n/g) || []).length + 1; + console.log("resize"); + md.style.height = md.scrollHeight + 'px'; + + /*md.rows = (md.value.match(/\n/g) || []).length + 1; while (md.scrollHeight > md.clientHeight) { md.rows *= 1.5; - } + }*/ } function putontop() @@ -1156,6 +1159,7 @@ function showhelp() help.push("## Libs"); help.push("[Showdown](https://showdownjs.com/)"); + help.push("[Inconsolata](https://levien.com/type/myfonts/inconsolata.html)"); help.push("## Inspiration"); help.push("[rwtxt](https://rwtxt.com)"); @@ -1284,6 +1288,10 @@ function mainkeydownhandler() searchdialog.hidden = true; md.focus(); } + else if (currentnote.title == "Help") + { + loadlast(); + } else if (preview.hidden == false) { togglepreview();