I tested both example from docs and your example. Both work, so docs example is not broken, as I previously assumed. Something else is the problem. Perhaps you started with one version of the block and then renamed something in code, or accidently added something. Enter code editor instead of visual editor in block editor options and check your block code. If that was an error, please edit original question with adding block code for future reference of all readers.
Related Posts:
- WordPress Full Site Editing: How can I access my posts listing page?
- block theme FSE – save changes to the theme?
- How to set the background color of a template part (Header/Footer) in Twenty Twentythree?
- How to move the customizations done in the Editor to my child theme?
- Block Theme Template parts – Why saving a part updates the other ones?
- Get postId in a wordpress pattern file?
- Full Site Editing (FSE) – How do I display no results with wp:query?
- How can I disable fontSizes of the Paragraph block inside the Quote block with theme.json?
- In Full Site Editing, how do I get the templates I created to appear in the site editor when populating a new page?
- Custom Link Block with own background color
- Add pre-publish conditions to the block editor
- How does Gutenberg handle translations in React?
- How can I access core/paragraph textColor in a block template
- Saving post meta using the new EntityProvider APIs
- gutenberg dynamic block is returning 404
- How should you internationalize javascript spread in multiple files but build in one?
- Why is onChange={ ( content ) => setAttributes( { content } )} now used?
- How to set column widths in a CPT block template?
- Access GutenBerg data with Javascript?
- Only show focused toolbar for Gutenberg Block with Multiple text fields
- Gutenberg: How to Change Post Status Programmatically?
- Adding a custom PanelColorSettings control to a core block, and using the color slug in a custom className
- How to define a Block Style in an Innerblocks template
- Option for removing block not appearing in custom gutenberg block
- Testing custom themes / plugins under Gutenberg
- Gutenberg LinkControl suggestionsQuery not working
- Gutenberg – How to prevent block from being deleted and reordered/moved
- WordPress Gutenberg Columns block
- Gutenberg InnerBlocks predefined block supports
- Is it possible to bulk migrate all deprecated instances of a gutenberg block?
- How to Add a Container Class to Standard Gutenberg Blocks
- How to display InnerBlocks in render callback
- How to check if post has Video or Gallery block in Gutenberg blocks?
- Gutenberg – button to parse and format all blocks?
- Gutenberg Button Border Radius Default
- Disable title block on edit screen for a custom post type
- Can Gutenberg be used as an editor on a page?
- Import external data into post using custom Gutenberg block
- How do a I add an attribute to element (when using block theme)?
- Do I need wp-tinymce-js?
- wp_schedule_single_event issue with save_post hook in gutenberg
- Gutenberg TextareaControl escapes html
- Block editor fails to update HTML section when the word “from” is in source code
- Gutenberg extending the existing class
- Creating Block templates with ‘core/heading’ other than level 2
- how to trigger a Gutenberg image gallery lightbox
- Remove or rename “Default” from Gutenberg typography settings
- Wp-script package stop to work
- CheckboxControl does not visible change
- How to import Reusable Blocks programatically?
- Remove formatting in rich text with Gutenbergs Block editor
- Setting font sizes in theme.json
- Is it possible to disable font sizes on sub blocks only?
- Get selected block every time a new block is selected in Gutenberg
- How do I include and iframe in a Custom Block?
- Gutenberg InnerBlocks with ACF Blocks – How to enable multiple buttons?
- How to work with multilingual sites using the full site editor and block themes?
- Trying to edit a page returns the editor encountered an unexpected error
- Block patterns: Any way to reset the pattern to whatever is in the code?
- Is there a function to “blockify” html?
- Custom style css doesn’t work in Gutenberg preview
- Gutenberg get list of all custom image sizes
- How to set a template part area?
- Video Block does not autoplay
- Upgraded to wordpress 5.7 and now I can’t select myself as a post author
- Stop JSON code from injecting into gutenburg classic block
- Extend the “Convert to Blocks” feature to add additional functionality
- Gutenberg/WordPress – Limit number of categories
- Block editor not displaying properly
- Can the Gutenberg editor be toggled closed?
- Guenberg Block Not Saving – When additional div added
- How to open WordPress media create/edit Gallery Dialog
- WordPress custom block compatability with WPML
- Add a button to the Gutenberg editor header
- Component toggle not toggling
- Disabling gutenbeg slow down post saving
- How do I add custom CSS animations for specific Gutenberg blocks?
- How to solve react dom ‘removeChild’ on Node error while google translate extension is on and selecting any core block [closed]
- Is it possible to consume context from a parent block and update it from within a child block?
- Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined
- WordPress “HTML editor” which doesn’t trash hand-coded HTML?
- How to force package.json to create build some files?
- How to modify array of object in Gutenberg (block/editor)?
- fetch more than 100 records in block editor API call
- Block development: how to bump version on generated css files?
- Dealing with unknown option ‘–variant’ when setting up a block environment
- Full site editing templates folder vs block-templates
- Localising a Block
- WordPress.org UI: How do you make Bulleted/Numbered Lists indent by default?
- Is there a way to delete “wp-block-group__inner-container” div from the gutenberg editor view?
- Gallery Block in template, validation fails after adding column number
- My block plugin break causes “an unexpected error in the block editor”
- Is it possible to remove the gutenberg duotone effect on hover?
- Getting index of a custom ACF block with PHP?
- Gutenberg Dev – React Context.Provider returns undefined
- Avoid automatic scroll jump when dragging a resize handle in a Gutenberg block
- Gutenberg Group block missing Layout options
- How to use ACF fields content in backend?
- Why does using different URLs in WordPress settings cause a “Publishing failed, you are offline” error?
- Registering plugin’s Gutenberg blocks in custom theme