How do I allow line breaking in textarea input in django to later show this input on page?
linebreaks
Replaces line breaks in plain text with appropriate HTML; a single newline becomes an HTML line break (<br />
) and a new line followed by a blank line becomes a paragraph break (</p>
).
For example:
{{ value|linebreaks }}
If value is Joel\nis a slug
, the output will be <p>Joel<br />is a slug</p>.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With