Adding a Rich Text editor to a custom resource page
I’m building a custom Filament resource page, and I’d like to include the same RichEditor that Filament uses in forms - instead of a plain <textarea> like this:
What’s the recommended way to replace this with Filament’s built-in RichEditor?
Any best-practice examples or tips would be really appreciated.
3 Replies
why don't you add a filament form?
- Use statePath (like 'data') for predictable state management.
- Use the same component and schema style Filament uses for resources for better consistency.
- If you need custom configuration (file uploads, blocks, etc.), use the RichEditor API as shown in the documentation.
- Always validate and sanitize RichEditor input before saving to your database.
You will have to use a form in the page to be able to use the RichEditor. The blade file won’t work on its own since it depends on methods from the Field class to be able to render and work.