Skip to content

Commit

Permalink
[Fix] Format text to prevent stripping line breaks (#14)
Browse files Browse the repository at this point in the history
* Format text to prevent stripping line breaks

* Fix styling

---------

Co-authored-by: Baspa <[email protected]>
  • Loading branch information
Baspa and Baspa authored Jan 13, 2025
1 parent 2cf4e52 commit a542c6c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Resources/MailResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Filament\Tables\Table;
use Illuminate\Support\Carbon;
use Illuminate\Support\Collection;
use Illuminate\Support\HtmlString;
use Illuminate\View\View;
use Vormkracht10\FilamentMails\Resources\MailResource\Pages\ListMails;
use Vormkracht10\FilamentMails\Resources\MailResource\Pages\ViewMail;
Expand Down Expand Up @@ -269,6 +270,7 @@ public static function infolist(Infolist $infolist): Infolist
->copyMessage('Copied!')
->copyMessageDuration(1500)
->label(__('Text Content'))
->formatStateUsing(fn (string $state): HtmlString => new HtmlString(nl2br(e($state))))
->columnSpanFull(),
]),
])->columnSpanFull(),
Expand Down

0 comments on commit a542c6c

Please sign in to comment.