Skip to content

Kirby 4.4.1

$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() ?>