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:
parent
7ed60f58e6
commit
ae138a7a48
12
main.js
12
main.js
|
@ -1071,11 +1071,14 @@ function resize()
|
||||||
{
|
{
|
||||||
if (md.clientHeight > md.scrollHeight) return;
|
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)
|
while (md.scrollHeight > md.clientHeight)
|
||||||
{
|
{
|
||||||
md.rows *= 1.5;
|
md.rows *= 1.5;
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
function putontop()
|
function putontop()
|
||||||
|
@ -1156,6 +1159,7 @@ function showhelp()
|
||||||
|
|
||||||
help.push("## Libs");
|
help.push("## Libs");
|
||||||
help.push("[Showdown](https://showdownjs.com/)");
|
help.push("[Showdown](https://showdownjs.com/)");
|
||||||
|
help.push("[Inconsolata](https://levien.com/type/myfonts/inconsolata.html)");
|
||||||
|
|
||||||
help.push("## Inspiration");
|
help.push("## Inspiration");
|
||||||
help.push("[rwtxt](https://rwtxt.com)");
|
help.push("[rwtxt](https://rwtxt.com)");
|
||||||
|
@ -1284,6 +1288,10 @@ function mainkeydownhandler()
|
||||||
searchdialog.hidden = true;
|
searchdialog.hidden = true;
|
||||||
md.focus();
|
md.focus();
|
||||||
}
|
}
|
||||||
|
else if (currentnote.title == "Help")
|
||||||
|
{
|
||||||
|
loadlast();
|
||||||
|
}
|
||||||
else if (preview.hidden == false)
|
else if (preview.hidden == false)
|
||||||
{
|
{
|
||||||
togglepreview();
|
togglepreview();
|
||||||
|
|
Loading…
Reference in New Issue