gutenberg

  • WordPress Blocks: Hydrate InnerBlocks From HTML

    Hydrate InnerBlocks From HTML. For instance if your block pulls information from a remote API and you want to display as part of the post, or embed in the post such that it’s editable. The block editor already handles the job very simply

  • WordPress Blocks: React Context Cuts Clutter

    Using Reacts’ Context in WordPress blocks passes parameters painlessly. Attributes carried by context keep coupling minimal. Reacts’ Context feature facilitates distributing data down a component tree to any descendant component. Instead of passing attributes between your components manually (e.g. <FooComponent attrib={ attrib }>), which tightly couples the current attributes and components, using a block-level context…

  • Debugging Gutenberg Blocks: 1

    I’m adding some tags for tips as I find them. I found this tip helpful when debugging what the WordPress Block Editor (Gutenberg) was actually doing behind the scenes. Find the post id (in the edit url there will be a field for post (e.g. post.php?post=121&action=edit). Using the WP-CLI tool you can quickly view the…