thefireflytech / filament-blog

Blog plugin for laravel filament
https://packagist.org/packages/firefly/filament-blog
Other
86 stars 34 forks source link

Saving tiptap editor as JSON will result in Array to String conversion when saving post #36

Open pvdptje opened 1 month ago

pvdptje commented 1 month ago

If you set the TiptapEditor config to save the output as JSON, you'll encounter a "Array to string conversion" error when trying to save a post.

The reason for this is that you need to cast the 'body' value to array if you want to use JSON output.

However, we can not change the cast values on runtime (tested it, does not work), so I think we need to be able to define our own post Model just like the user model.

Is there any other solution?