I\'m creating a note app where users can add a note by entering multiline text in a textarea. When I save the note in Firebase it is being saved with newline (\\n) character
pre
element.A element will preserve whitespace within it, eg:
This is followed by a newline,
not that you can tell
You can see the newline after me!
Woohoo!
Will result in:
This is followed by a newline, not that you can tell
You can see the newline after me!
Woohoo!
This way, you do not need to do any filtering of newlines.