Default blocks previews hardcoded?

I use this great plugin to display the block’s fields in the preview: GitHub - jongacnik/kirby-fields-block: Kirby block preview plugin to directly render block fields

Since Kirby comes with some default blocks I want to overwrite their previews, too. But it seems like the preview is hardcoded. These blocks have names like image and text so it would be great to use them.

Some background info on how the plugin works: it registers a “fields” block with the magic preview. To use this preview you can simply add preview: fields to custom blocks.

# site/blueprints/blocks/image.yml

name: Image
preview: fields
fields:
  image:
    type: files
    multiple: false

No matter what I try, the block uses the default image preview. Same for every other default block.

This is not only relevant if you use the plugin but also if you want to set the default blocks previews to something else. E.g. you’re adding/changing the fields of the default blocks and you have to adjust the preview. There’s also this sentence in the docs: “You can take our core blocks as a starting point for your own custom blocks and extend them with your own fields, snippets and previews.” (Blocks | Kirby CMS)

Locks like you can only overwrite the preview for default blocks with preview: false for no preview, or assign a custom preview with the same name.

To prevent having to copy the same stuff over and over again, you could assign a component to all default blocks. But it would be better if it was possible to define a custom preview via the blueprint.

Then I‘ll create an issue. Thank you!

EDIT: Default block previews can not be overwritten · Issue #3776 · getkirby/kirby · GitHub