存储到数据库的数据有空格和换行,当获取到数据时,页面也能正确显示,保留空格和换行。
<div style="white-space: pre-wrap;margin-left: 70px;">{{ post.content }}</div>
存储到数据库的数据有空格和换行,当获取到数据时,页面也能正确显示,保留空格和换行。
<div style="white-space: pre-wrap;margin-left: 70px;">{{ post.content }}</div>