Meteor: How to render line breaks?

后端 未结 5 535
滥情空心
滥情空心 2020-12-11 05:30

I have the following variable: \"hello↵↵world\". (the value is coming from a textarea)

The problem is when I ask Meteor to display it with {{content}}, everything ap

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-11 06:19

    If you're using bootstrap using the

     tag will come with some style that you probably don't want... If you want to avoid that you can solve this with some simple CSS:

    .pre {
      white-space: pre;
    }
    

    and then just wrap your content with that class:

    {{content}}
    

提交回复
热议问题