Answers for "html textarea take up full height"

1

make textarea auto height

function autoResize() {
	console.log('resizing');
	textInput.style.height = (textInput.scrollHeight) + 'px';
}
Posted by: Guest on September-05-2021
0

textarea height fit content

const textarea = document.getElementById("txt");

textarea.addEventListener("input", function (e) {
  this.style.height = "auto";
  this.style.height = this.scrollHeight + "px";
});
Posted by: Guest on November-18-2021

Code answers related to "html textarea take up full height"

Browse Popular Code Answers by Language