Open jasperck opened 7 months ago
Thanks for the issue.
I don't think you need an extra custom block to wrap the image block to define that context. You can probably wrap your whole editor with BlockContextProvider
and provide the context value to disable resizing globally.
@youknowriad Can you provide an example of how this could be done?
What problem does this address?
It seems like it is impossible to remove ResizeBox from the Image block from external, I tried allowResize in provideContext which is the pattern in Gutenberg Gallery block, however, it requires me to wrap the Image block with another layer of component, otherwise, it won't work. I think it’s overkill in this case because now we need an extra custom block to wrap the Image block just for the context.
What is your proposed solution?
I'm thinking of adding a new attribute so we can enable/disable resizing from external.