© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•5mo ago•
2 replies
bernhard

Rich editor custom block and spatie media library

I have a richtext editor field, where I am using
RichContentCustomBlock
RichContentCustomBlock
. One of these blocks should also use an image upload in the form of spatie media library field:

 public static function configureEditorAction(Action $action): Action
  {
      return $action
          ->modalDescription('Configure the hero block')
          ->schema([
              SpatieMediaLibraryFileUpload::make("image"),
              TextInput::make("title")
          ]);
  }
 public static function configureEditorAction(Action $action): Action
  {
      return $action
          ->modalDescription('Configure the hero block')
          ->schema([
              SpatieMediaLibraryFileUpload::make("image"),
              TextInput::make("title")
          ]);
  }


This works somehow. I can upload an image. But I can't access it, in the toHtml method:

public static function toHtml(array $config, array $data): string
  {
      dd($config, $data);
  }
public static function toHtml(array $config, array $data): string
  {
      dd($config, $data);
  }


In config, there is only
title
title
. This makes sense, since there is no real connection between the created media library entry and the current block?

Is this just not implemented, or am I doing something wrong?
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Rich editor and spatie media library
FilamentFFilament / ❓┊help
7mo ago
Rich Editor + Spatie?
FilamentFFilament / ❓┊help
2y ago
Form Builder Block & Spatie Media Library
FilamentFFilament / ❓┊help
17mo ago
Spatie Media Library custom properties
FilamentFFilament / ❓┊help
14mo ago