I have a problem regarding textarea and text previewing. It doesn't recognize Enter button as a newline character. Any ideas how to make this previewing correctly?

EDIT :

I want this text automatically change line when it's not fitting instead of h-scroll.
Answer :
pre {
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
}
You can use <pre> tag while printing text from textarea it will reflect all your new lines as it is entered text in textarea
Just use <pre> before content.e.g.
<pre> Text Content From text Area</pre>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With