1

When my textarea is filled with content I don't want it to accept anymore content that exceeds its rows and cols.

Illustration:

Textarea default(part 1):

enter image description here

Textarea Full(part 2):

enter image description here

Textarea exceeds height(part 3):

enter image description here enter image description here

I don't want part 3 to happen, it keeps the height but the content moves when a newline is entered. I have tried the answer from Limit number of lines in textarea and Display line count using jQuery but it only stop my inputs when I press Enter, but it keep accepting inputs when enter a long word:

Example: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

I tried another way by using AutoGrow textarea Plugin because it gets the Line and Characters per Line, so when the text line is equal to the row of the textarea it will increase its rows. It was the closest solution that I can think of but it failed too.

Community
  • 1
  • 1
Christian Eric Paran
  • 980
  • 6
  • 27
  • 49
  • if you only need to detect pasting text, read http://stackoverflow.com/a/3212056/643500 – Sully May 16 '12 at 16:59

0 Answers0