Rich editor and spatie media library
In the docs for the rich text editor in V4 - https://filamentphp.com/docs/4.x/forms/rich-editor#uploading-images-to-the-editor - you can find:
Filament also supports spatie/laravel-medialibrary for storing rich editor file attachments. See our plugin documentation for more information.But there is no further documentation for this in the corresponding page (https://filamentphp.com/plugins/filament-spatie-media-library#using-media-library-for-rich-editor-file-attachments). Is this a known issue or am I just stupid/blind?
Filament
Spatie Media Library by Filament - Filament
Filament support for Spatie's Laravel Media Library package.
Solution:Jump to solution
@awcodes Well I tried this now again with the current documentation provided under https://filamentphp.com/plugins/filament-spatie-media-library#using-media-library-for-rich-editor-file-attachments
I copy pasted the code, just renamed the class:
```php...
3 Replies
It’s in the readme on the 4.x branch of the plugin. Right now you’d need to look at it in GitHub.
Solution
@awcodes Well I tried this now again with the current documentation provided under https://filamentphp.com/plugins/filament-spatie-media-library#using-media-library-for-rich-editor-file-attachments
I copy pasted the code, just renamed the class:
and now i get:
I have no idea whats wrong?
Ah, nevermind. Its a typo in the docs. Its
fileAttachmentProvider
not fileAttachmentsProvider