I can use mobiscroll to make a text area auto grow as I type by using mbsc-textarea, and this is great. However, if I load the page with a bunch of content already in the text area it only shows the first line.
I’d like it to also auto grow on page load if I render the page with content already in the text area. How do I accomplish this?
Yes, but then I’d have to know how many rows to display based on the content. I’d like to have the input as small as possible each time, so if there’s only one line of text it’s only showing one row high, but if there are three lines it shows three rows high.
I assumed I could call the same function you use to auto-grow it when the user is typing, but just call it on page load. Is that not possible?
Sorry about the misunderstanding!
Could you please share what method are you using for setting the value of the textarea? Do you change the value dynamically?