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)
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)
No description
Solution:
I think this may work
->modalDescription(fn ($record) => new HtmlString($record->description))
->modalDescription(fn ($record) => new HtmlString($record->description))
...
Jump to solution
2 Replies
Solution
Lara Zeus
Lara Zeus15mo ago
I think this may work
->modalDescription(fn ($record) => new HtmlString($record->description))
->modalDescription(fn ($record) => new HtmlString($record->description))
Nazirov Abdulaziz
Nazirov AbdulazizOP15mo ago
Thank you
Want results from more Discord servers?
Add your server