changed: try to improve autosize

added: inconsolata fonts in reference
changed: back to previous note when typing escape form help page
This commit is contained in:
quenousimporte 2023-01-18 19:35:38 +01:00 committed by GitHub
parent 7ed60f58e6
commit ae138a7a48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 2 deletions

12
main.js
View File

@ -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();