admin管理员组文章数量:1130349
How do I modify a core block, in my case gallery block to add extra markup to can fire some lightbox on created gallery. Is there a way to hook in on render of gallery on frontpage to adjust markup?
How do I modify a core block, in my case gallery block to add extra markup to can fire some lightbox on created gallery. Is there a way to hook in on render of gallery on frontpage to adjust markup?
Share Improve this question asked Jan 5, 2019 at 18:09 fefefefe 8943 gold badges14 silver badges34 bronze badges1 Answer
Reset to default 5You need to use Block Filters to modify existing blocks. There are couple of handy hooks you need to use in place of edit and save function to wrap around core blocks into your desirable block structure.
For your purpose I guess, you need to use - blocks.getSaveElement and editor.BlockEdit
How do I modify a core block, in my case gallery block to add extra markup to can fire some lightbox on created gallery. Is there a way to hook in on render of gallery on frontpage to adjust markup?
How do I modify a core block, in my case gallery block to add extra markup to can fire some lightbox on created gallery. Is there a way to hook in on render of gallery on frontpage to adjust markup?
Share Improve this question asked Jan 5, 2019 at 18:09 fefefefe 8943 gold badges14 silver badges34 bronze badges1 Answer
Reset to default 5You need to use Block Filters to modify existing blocks. There are couple of handy hooks you need to use in place of edit and save function to wrap around core blocks into your desirable block structure.
For your purpose I guess, you need to use - blocks.getSaveElement and editor.BlockEdit
本文标签: customizationGutenberg extend core blocks
版权声明:本文标题:customization - Gutenberg extend core blocks 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749039059a2306845.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论