Open asafm7 opened 2 months ago
Thanks for reporting this. I think this is an existing issue for patterns, even before overrides existed. Any heading (or other block that supports 'anchor') in a pattern would be duplicated, including the anchor, when that pattern is inserted twice in the same post. Users would probably solve this by detaching the pattern content and editing it.
Block bindings/pattern overrides supporting the anchor
attribute is a good opportunity to solve this.
There would be some UI issues to solve as the anchor
attribute is presented in the block inspector, and that's unavailable for overriden blocks in patterns (due to the contentOnly
UI - see Advancing contentOnly editing).
cc @SantosGuillamot, this might be something to consider on the block bindings roadmap.
Description
HTML Anchor attribute setting is available on a global level for an overridden block.
This makes the HTML invalid (as the ID should be unique) and impossible to use HTML Anchors inside patterns.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.