F
Filament•2y ago
Spârky

Using html() on a RichEditor-set value still rendering the tags

Hi guys! I noticed that the values set by a RichEditor in a form render with the tags in the tables, even when using html(). Did I misunderstand something? Thanks 🙂
6 Replies
Patrick Boivin
Patrick Boivin•2y ago
Hi @sparkyyy_, can you share a bit of code to show how you're using it?
Spârky
SpârkyOP•2y ago
Patrick Boivin
Patrick Boivin•2y ago
And you're seeing HTML tags in your table column?
Spârky
SpârkyOP•2y ago
Yes, when I enter plain text in the Rich Editor, I get the <p> tag in the table
Patrick Boivin
Patrick Boivin•2y ago
Hmmm, not sure... Have you tried something like this:
->formatStateUsing(fn ($state) => strip_tags($state))
->formatStateUsing(fn ($state) => strip_tags($state))
Spârky
SpârkyOP•2y ago
Huh, the problem was present on my intern's project, I just pulled it on my computer and I don't have the issue I'll check his machine Well, I ran composer update, cleared cache, restarted server etc. but no effect Update: I found a way to resolve the issue Putting html() AFTER limit() does work, but doesn't if placed before
Want results from more Discord servers?
Add your server