Any way to find out which line break char(s) to use in Javascript?
- by Irro
I'm trying to parse some text into a textarea control and at the same time replace all with ordinary line break chars.
I have been able to do it in windows by replacing with CR (it didn't work with CRLF strangely enough, it gave me linebreak + empty space) but I'm afraid that this code won't work in Unix/Mac because they use LF for line break.
Is there any way to use the system default line break char in javascript? Something similar to Environment.NewLine in .Net
(I wasn't able to write backslash in this editor but I use /r for CR and /n for LF, replace / with backslash)