Hi, I have a problem with my RichEditor. I use a relationship in my model form and when I save it without changing the text in the RichEditor than I get this error:
Filament\Forms\Components\RichEditor::Filament\Forms\Components{closure}(): Argument #2 ($rawState) must be of type ?array, string given, called in /vendor/filament/support/src/Concerns/EvaluatesClosures.php on line 36
public function mount($record): void{ parent::mount($record); /** @var Coach $model */ $model = $this->record; // Convert HTML to Tiptap JSON for RichEditor if ($model->listingProfile && is_string($model->listingProfile->about_us) && ! empty($model->listingProfile->about_us)) { $editor = new Editor([ 'extensions' => [ new StarterKit(), ], ]); $editor->setContent($model->listingProfile->about_us); // Setze die konvertierten Daten direkt im Form-State $this->data['listingProfile']['about_us'] = $editor->getDocument(); dump($editor); }}
public function mount($record): void{ parent::mount($record); /** @var Coach $model */ $model = $this->record; // Convert HTML to Tiptap JSON for RichEditor if ($model->listingProfile && is_string($model->listingProfile->about_us) && ! empty($model->listingProfile->about_us)) { $editor = new Editor([ 'extensions' => [ new StarterKit(), ], ]); $editor->setContent($model->listingProfile->about_us); // Setze die konvertierten Daten direkt im Form-State $this->data['listingProfile']['about_us'] = $editor->getDocument(); dump($editor); }}
Package filament/forms Package Version v4.0.3 Laravel Version v12.25.0 Livewire Version v3.6.4 PHP Version 8.4.11 Problem description On testing a RichEditor component I get the following error: Fi...