When using the text field, when it comes to line breaks, there is no line break effect when displayed on the page. In fact, the line break saved in the text field is /r/n. The browser cannot recognize this kind of line break, so it needs to be replaced when echoing Browser-readable code
The solution is to replace all spaces and line breaks in the text
data.content = '<p>' + data.content.replace(/ /g, ' ').replace(/\n|\r\n/g, '</p><p>') + '<p>'