Textarea inserting \n in mongodb

the text which i entered in textarea and press enter it is getting inserted in mongodb \n
so is it ok??
but when i display it in single line inspite of 3 enters, it still displays in a single line

shall i replace with \n with
tag
how to do that

what shall i do about it

Take a look at this

1 Like

that was useful, thanks

I think what you need in this case is to change the white-space property on the element that is displaying the text. white-space: pre-line is probably best, but you may want another option if your formatting needs are different. Have a look at https://developer.mozilla.org/en-US/docs/Web/CSS/white-space to get an idea of the different options.

1 Like