Answers for "textarea disallow new line"

CSS
2

textarea only one line

textarea {
  resize: none;
  white-space: nowrap;
  overflow-x: scroll; /* or hidden */
}
Posted by: Guest on June-24-2020
0

jtextarea automatic line break

textArea.setLineWrap(true);
textArea.setWrapStyleWord(true);
Posted by: Guest on July-01-2020
0

keep line breaks in textarea

// preserve line breaks ( \n -> <br> ) 
$_translated_text = nl2br($_original_text);
Posted by: Guest on July-24-2020

Browse Popular Code Answers by Language