Format.nl2br ViewHelper <f:format.nl2br>
Note
This reference is part of the documentation of Fluid Standalone. If you are working with Fluid in TYPO3 CMS, please refer to TYPO3's ViewHelper reference instead.
Wrapper for PHPs nl2br
function.
See https://www.php.net/manual/function.nl2br.php.
Examples
Default
<f:format.nl2br>{text_with_linebreaks}</f:format.nl2br>
Copied!
Text with line breaks replaced by <br />
Inline notation
{text_with_linebreaks -> f:format.nl2br()}
Copied!
Text with line breaks replaced by <br />
Go to the source code of this ViewHelper: Format\Nl2brViewHelper.php (GitHub).
Arguments
The following arguments are available for the format.nl2br ViewHelper:
value
-
- Type
- string
string to format