admin管理员组文章数量:1130349
I'm trying to create a full width blocks for the new Gutenberg editor, however I don't want to give to option to toggle the block alignment (eg: like the Cover block does) just make it full width all the time.
I managed to add support for this with the supports flag in my block:
supports: {
align: ['full']
}
attributes: {
align: {
type: 'string',
default: 'full'
}
}
This shows the block in the admin area as full width by default but it also displays the Block Alignment Toolbar at the top so it can be toggled on/off:
Is there a way to set the block alignment without displaying the toolbar?
I'm trying to create a full width blocks for the new Gutenberg editor, however I don't want to give to option to toggle the block alignment (eg: like the Cover block does) just make it full width all the time.
I managed to add support for this with the supports flag in my block:
supports: {
align: ['full']
}
attributes: {
align: {
type: 'string',
default: 'full'
}
}
This shows the block in the admin area as full width by default but it also displays the Block Alignment Toolbar at the top so it can be toggled on/off:
Is there a way to set the block alignment without displaying the toolbar?
本文标签: editorHow to display full width block without toolbar
版权声明:本文标题:editor - How to display full width block without toolbar? 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749110050a2317230.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论