Is possible to use Tooltip with html content?

I coudnt find anything in the docs abount html content inside tooltips.
4 Replies
toeknee
toeknee16mo ago
new HtmlString(Value here) If it doesn't work, build a custom view which doesn't sanitize the data. I do similar with a custom popover column where we render markdown
Trollfalgar
TrollfalgarOP16mo ago
new HtmlString(Value here) dosn't work. I will try with a custom view.
ckangwei83
ckangwei836mo ago
forwhoever needed this, below method works for me. it is not working when doing x-tooltip.html or x-tooltip.raw alone. But somehow defined an empty x-tooltip.html will make the raw works with html. hope this helps TextColumn::make('name') ->html()
->extraAttributes(fn (Model $record): Array => [ 'x-tooltip.html' => new HtmlString(), 'x-tooltip.raw' => new HtmlString(implode('<br>- ', ($record->whatever ?? ['-']))), ]),
Want results from more Discord servers?
Add your server