Skip to content

Kirby 4.5.0

$field->nl2br()

Converts all line breaks in the field content to <br> tags.

$field->nl2br(): Kirby\Content\Field

Return type

Kirby\Content\Field

Example

<?= $page->subtitle()->nl2br() ?>