<p>You can still use plain text, you just need to use a filter after </p>

<pre><code>{{ entry.text | nl2br  }}
</code></pre>

CC BY-SA 3.0
2018-01-30T22:29:42.820Z
I thought it should be possible but a Google and stackexchange search found nothing.
Paul Frost
CC BY-SA 3.0
2018-01-31T02:53:24.593Z
Usually just `{{entry.text | nl2br }}` will work - no need for the `raw`
Marion Newlevant
CC BY-SA 3.0
2018-01-31T09:51:44.260Z
I have other stuff in there as well to fix the long term issue of nbsp being added in redactor fields, {{ entry.mapDetails | replace({'&nbsp;' : ' '}) | nl2br | raw }}, do I still need the raw?
Paul Frost
CC BY-SA 4.0
2018-01-30T19:38:52.350Z
2018-09-26T21:43:54.067Z
2018-09-26T21:43:54.067Z
Matthew Rotter
<p>When you create a Plain Text field it asks if you want to allow line breaks, but they are ignored when output in the template.</p>

<p>I don't want to have to use a rich text field just to enable editors to add a simple line break, but is that my only option?</p>

CC BY-SA 3.0
2018-01-30T19:39:09.597Z
Have you tried to use the https://twig.symfony.com/doc/2.x/filters/nl2br.html `|nl2br` function, maybe you need to escape it with `text = entry.yourTextField|nl2br` and after that `{{ text|raw}}`
Robin Schambach
<plaintext>
Enable line breaks in plain text fields
# Enable line breaks in plain text fields

(Asked by: username_0 on 2018-01-30)

When you create a Plain Text field it asks if you want to allow line breaks, but they are ignored when output in the template.

I don't want to have to use a rich text field just to enable editors to add a simple line break, but is that my only option?

**Tags:** plaintext
> **Comments:**
> **username_1**: Have you tried to use the https://twig.symfony.com/doc/2.x/filters/nl2br.html `|nl2br` function, maybe you need to escape it with `text = entry.yourTextField|nl2br` and after that `{{ text|raw}}`  

---

## 1 answers

### Answer by username_2 on 2018-01-30. Score: 6 | Accepted answer

You can still use plain text, you just need to use a filter after 
{{ entry.text | nl2br  }}

> **Comments:**
> **username_0**: I thought it should be possible but a Google and stackexchange search found nothing.  
> **username_3**: Usually just `{{entry.text | nl2br }}` will work - no need for the `raw`  
> **username_0**: I have other stuff in there as well to fix the long term issue of nbsp being added in redactor fields, {{ entry.mapDetails | replace({'&nbsp;' : ' '}) | nl2br | raw }}, do I still need the raw?  

---

