How to set autoheight of textinput?

How to set autoheight of textinput?

Hi,

I have set a width of text input to 100% of my div. But how to set height of this text input when first line is filled up? .. then it should give me a new line ... or in reverse ... if I am deleting some characters from for example second line, and there are no more characters and I press Backspace ... then second line disappear ... hope you understand me. And thank you for answers.