Core Image block doesn't use align support property for Block Alignement #36434
Labels
[Block] Image
Affects the Image Block
[Feature] Extensibility
The ability to extend blocks or the editing experience
Description
The default mechanism for adding alignment supports for blocks these days is specifying it in the block supports like so:
This comes with the nice benefit of being able to override the supported align properties for any block using the
blocks.registerBlockType
hook.The Core Image Block does not use this newer API jet, but instead still uses the
BlockAlignmentControl
manually in its BlockEdit function. Which makes it pretty much impossible to filter/extend.gutenberg/packages/block-library/src/image/edit.js
Lines 331 to 334 in ee398e0
Proposed Solution:
remove the custom usage of the
BlockAlignmentControl
and replace it with thesupports.align
option inblock.json
Step-by-step reproduction instructions
does not apply
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: