We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi guys! There is a solution for add a preview image for the core Gutenberg blocks when you hover over their icons in the top left add block popup?
It would be great to be able to set a static image for custom blocks registered with acf_register_block_type.
For example we could add a "PreviewImage" like this:
{{-- Title: Name Block Description: Description Block Category: formatting Icon: admin-comments Keywords: quote Mode: edit Align: left PostTypes: page post SupportsAlign: left right SupportsMode: false SupportsMultiple: false EnqueueStyle: styles/style.css EnqueueScript: scripts/script.js EnqueueAssets: path/to/asset Preview: true PreviewImage: path/to/my/block/preview.jpg --}}
Can you help me?
The text was updated successfully, but these errors were encountered:
Hi!
Looking at ACF's documentation, are you referring to the section with Header: Adding block previews ?
Sorry, something went wrong.
Hi @andevit did you find something ?? It's exactly what I need 😬
you can add dummy preview data like like this in meantime Simple hook into filter
`add_filter('sage/blocks/button/register-data', function ($data) {
$data['example'] = [ 'attributes' => [ 'mode' => 'preview', 'data' => [ 'link' => [ 'title' => 'Change me', 'url' => '#', 'target' => '_self' ], 'type' => 'primary', 'size' => 'regular', 'icon' => '', ] ] ]; return $data;
}); `
Any progress on this?
No branches or pull requests
Hi guys!
There is a solution for add a preview image for the core Gutenberg blocks when you hover over their icons in the top left add block popup?
It would be great to be able to set a static image for custom blocks registered with acf_register_block_type.
For example we could add a "PreviewImage" like this:
Can you help me?
The text was updated successfully, but these errors were encountered: