I am looking to replicate the comment feature from Facebook exactly. For instance, if I input a sentence that goes beyond the width of the textbox or hit enter for a new line, the textbox should drop down by one line to fit the new content.
Visual Representation:
Scenario 1
I type a single sentence within the textbox without exceeding the available width, so no additional lines are created below.
Scenario 2
If I enter four sentences, each with a new line character, the textbox will adjust by lowering one line to accommodate the last sentence, "For Example".
Scenario 3
As I add more lines, the textbox should expand to provide space for the new sentences.
Scenario 4
When I delete lines, the size of the textbox should shrink to adjust for the reduced text. In Scenario 4, the appearance may be misleading due to the blank line where my text cursor is located.