KnowsLittle
KnowsLittle

Reputation: 1227

Html, Javascript, Create a textarea that automatically limits the amount of rows (NOT just newlines)

I want to create a textarea in html that limits the amount of lines it can contains, for example, let's say it can contain 6 lines. However, not just newlines (/r/n, after a user presses enter) but also when a newline is automatically started. For example, this paragraph contains 4 lines, but I haven't pressed the enter key any time at all. How can I do this?

Upvotes: 2

Views: 176

Answers (1)

Phillip Kovalev
Phillip Kovalev

Reputation: 2487

No way to implement described behaviour while users can define their own fonts and scale pages in the web-browsers. Your question take 3 lines for me, for example.

Upvotes: 2

Related Questions