When setting the default alignment to “wide” and disabling the toolbar, does not reflect the “wide” condition in the editor. It will return to the default.
on the front-end, everything works fine.
Code for setting the alignment and disabling the toolbar for alignment:
'align' => 'full', 'supports' => [ 'align' => false, ],
This does not place
data-align="full" on a block, but removes the attribute in total.
When setting support align to “true” you can toggle between default and full, something that should not be happening if the default is “full” and the only support is “full”
Also noticing this behavior. Seems counter to what it should do (or at least two what I’d expect it to do), which is for the default alignment to honor the value of the specified align property.
When set to full, blocks seem to not be displaying as full. I still have to click the full icon – which means I also have to leave that icon visible.
Ideally I’d be able to set the default alignment to full and also disable the icon bar.
Did anyone fix this issue?
I’ve tried to add custom CSS to the admin panel:
.block-editor-block-list__layout .block-editor-block-list__block[data-align=full], .block-editor-block-list__layout .block-editor-block-list__block[data-type^="acf/"], @media (min-width: 600px) margin-left: -45px margin-right: -45px .block-editor-block-list__block-edit @media (min-width: 600px) margin-left: -44px margin-right: -44px
It worked, but Gutenberg still doesn’t understand that this block has a full width, so part of its interface is hidden. It feels too hacky to me. I wish it would work out of the box.
Here is the workaround: https://github.com/AdvancedCustomFields/acf/issues/91
The initial setting for the size of the block is fine when both ‘align’ and ‘supports[align]’ have been configured. But the align-toolbar still shows, which results in the user being able to toggle between the ‘wanted’ and ‘unwanted’ align setting, although there should be only one option.
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
Last but not least, we built a 100% PHP based Gutenberg Block API designed specifically for theme developers in the real world creating bespoke and maintainable blocks for future driven projects!https://t.co/bx8HrCwkjF— Advanced Custom Fields (@wp_acf) May 31, 2021
❤️ 10 of 10 pic.twitter.com/OacUqWGrZZ
© 2021 Advanced Custom Fields. Subscribe