I have a form and one of the fields is textarea
How do I send this data so that the new lines(\n) will be included and will be saved into the database?
I have a form and one of the fields is textarea
How do I send this data so that the new lines(\n) will be included and will be saved into the database?
Since I got it working, I'm just gonna answer my own question:
I got it working by using regex.
str.replace(/(?:\r\n|\r|\n)/g, '<br>')
will do the thing.