1
I have some fields textarea
and I want to limit the number of characters per line using jQuery.
I don’t have code to handle Laerte yet, I insert it into the database with php and display it in html with php nl2br to break the line. I need to limit and do not know how to do, when the user type an amount of characters that exceeds the width of the div the text continues out of the div because there was no line break. I’m not in the with problem in the personal textarea, I’m time to pull from the bank, I have no problems with the amount of characters and yes with the amount of characters without giving a space getting a huge word. -
sets a maxlength in textarea and puts a max-width and maxheight in css
– Gabriel Rodrigues
Already tried, pop the div and have some browsers who do not obey the maxlenght command.
– Bruno Luiz
You can add the code to the question?
– Laerte
You want to do a word wrap?
– DH.
which browser you tested ? http://caniuse.com/#feat=maxlength
– Gabriel Rodrigues
I don’t have code to handle Laerte yet, I insert it into the database with php and display it in html with php nl2br to break the line. I need to limit and do not know how to do, when the user type an amount of characters that exceeds the width of the div the text continues out of the div because it did not have a line break. I’m not in trouble with the personal textarea, I’m in the bank pull time, I have no problem with the amount of characters but with the number of characters without giving a space getting a huge word.
– Bruno Luiz
Maybe you can handle this directly in html using the wrap="on" property in your text area example link https://jsfiddle.net/r63sfc4o/
– Douglas Benitez