F
Filamentβ€’3mo ago
Toni

html content stripped out of modal action

Hi, This is the action of my dashboard:
public function getHeaderActions(): array
{
return [
Action::make('info')
->label(__('dashboard.info'))
->icon('fal-circle-info')
->modalHeading(__('dashboard.infoTitle'))
->slideOver()
->modalSubmitAction(false)
->modalContent(function() {
return view('dashboard.info', [
'studyInformation' => app(StudySettings::class)->description,
]);
}),
];
}
public function getHeaderActions(): array
{
return [
Action::make('info')
->label(__('dashboard.info'))
->icon('fal-circle-info')
->modalHeading(__('dashboard.infoTitle'))
->slideOver()
->modalSubmitAction(false)
->modalContent(function() {
return view('dashboard.info', [
'studyInformation' => app(StudySettings::class)->description,
]);
}),
];
}
This is the content of the view:
<div>
{!! $studyInformation !!}
</div>
<div>
{!! $studyInformation !!}
</div>
desire.png shows how it should look like and reality.png shows how it looks. I can't figure out where the html-tags are stripped. The html content is written with the TipTap Editor and stored as setting with spatie-settings as html string. Thank you in advance
This is how it should look like
This is how it looks
3 Replies
Vp
Vpβ€’3mo ago
What is this app(StudySettings::class)->description return? Does it still contain HTML attrs/elements
awcodes
awcodesβ€’3mo ago
Wrap your output in a prose class. Or create your own styling. Tailwind resets all html styling.
Toni
Toniβ€’3mo ago
@awcodes THANK YOU!!! Now it works perfect. My learning from this issue is that I have to learn a lot about tailwind πŸ˜‰
Want results from more Discord servers?
Add your server