Answer the question
In order to leave comments, you need to log in
How to keep line breaks?
There is a contenteditable div in which the text is written. How to save text without losing line breaks?
I tried to save the entire html, remove tags, except for hyphens, and display in the template using safe, but nothing good came of it.
When replacing with '\n' divs, which are created when wrapping in contenteditable, the text is saved with wraps, but is displayed without.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question