html codes are displayed as plain text in modal window

Tables\Actions\Action::make('result')
                    ->iconButton()
                    ->icon('heroicon-m-chart-pie')
                    ->modalContent(function (&$record) {
                        $res = json_decode(Http::get(route('questionnaire.result', ['id' => $record->id]))->body(), true);
                        $record->description = $res['description'];
                        unset($res['description']);
                        return view('questionnaire_results', ['results' => $res]);
                    })
                    ->modalDescription(fn ($record) => $record->description)
                    ->label('Natijalar')
                    ->modalSubmitAction(false)
                    ->modalCancelAction(false)
Screenshot_850.png
Solution
I think this may work
->modalDescription(fn ($record) => new HtmlString($record->description))
Was this page helpful?