editor: auto size textarea and stretch their label
This commit is contained in:
parent
c28261211c
commit
19d760aa1c
2 changed files with 2 additions and 2 deletions
|
|
@ -72,7 +72,7 @@ var editObject = function(container, data, refresh){
|
|||
|
||||
} else if (i == 'layout') {
|
||||
|
||||
input = $(`<textarea data-type="${type}" title="${i}" rows="1">${value}</textarea>`)
|
||||
input = $(`<textarea data-type="${type}" title="${i}" rows="${value.split('\n').length}">${value}</textarea>`)
|
||||
input.on('input focus', function(){
|
||||
if (this.scrollHeight==0) return
|
||||
this.style.height = 'auto'
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
margin-top: -1rem;
|
||||
// box-shadow: 0 0 0 1 var(--color-bg);
|
||||
background:var(--color-bg);
|
||||
align-items: flex-start;
|
||||
align-items: stretch;
|
||||
z-index: 1;
|
||||
border-bottom: 1rem solid var(--color-bg);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue