Line breaks in TextEntry

Hi, I have a "TEXT" field in my MySQL table. I use Textarea in the form to edit it. It has some line brakes, but when I show it in the Infolist, it doesn't brake lines. I've tried ->html() , but doesn't work. Any help? Thanks!
No description
No description
2 Replies
charlie
charlie3w ago
maybe something like that ?
TextEntry::make('...')
->formatStateUsing(fn($state) => nl2br($state))
->html(),
TextEntry::make('...')
->formatStateUsing(fn($state) => nl2br($state))
->html(),
Matthew
Matthew3w ago
Check your table raw data, if it is just text, and no html, then you've got something like middleware aggresively sanitising the input.

Did you find this page helpful?