Answer the question
In order to leave comments, you need to log in
How do I move to the next line?
I get the following from the back:
(this is only an important line)
....
"about": "......\nПомимо этого я занимаюсь профессионально фотографией и видеосъемкой."
.....
Answer the question
In order to leave comments, you need to log in
You can use css, set the white-space property to the element with the text: pre-wrap;
In this case, all line breaks '\n' will be taken into account.
Google:
js replace all
Find:
String.prototype.replaceAll = function(search, replace){
return this.split(search).join(replace);
}
// Используем
"текст".replaceAll('\n', '<br>')
"текст".split('\n').join('<br>')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question