editor: Set textarea minimum height

This commit is contained in:
Eragon 2022-04-22 10:50:51 +02:00
parent 69cf7663c1
commit 33cbba421e
Signed by: Eragon
GPG Key ID: 087126EBFC725006
3 changed files with 10 additions and 0 deletions

View File

@ -1,6 +1,7 @@
.editor .btn-group {
display: flex;
justify-content: space-between;
margin: 5px;
}
.editor .btn-group button {
background-color: var(--background);
@ -12,6 +13,9 @@
.editor .btn-group button > svg > rect {
fill: var(--icons);
}
.editor textarea {
min-height: 10rem;
}
.separator {
display: inline-block;
width: 0;

View File

@ -4,6 +4,7 @@
& .btn-group {
display: flex;
justify-content: space-between;
margin: 5px;
& button {
background-color: var(--background);
@ -17,6 +18,10 @@
}
}
}
& textarea {
min-height: 10rem;
}
}
// From gitea

View File

@ -15,6 +15,7 @@ ta = document.querySelector(".editor textarea");
ta.addEventListener('keydown', function(e) {
let keyCode = e.keyCode || e.which;
if (keyCode == 9) {
// TODO Add one tab to selected text without replacing it
e.preventDefault();
let start = e.target.selectionStart;