Skip to content

Instantly share code, notes, and snippets.

@vburlak
Last active September 7, 2022 12:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vburlak/9928afdb11d4584a3a620ecbeb67fa0d to your computer and use it in GitHub Desktop.
Save vburlak/9928afdb11d4584a3a620ecbeb67fa0d to your computer and use it in GitHub Desktop.
Log all default Gutenberg Blocks in Console Log
// grab all block types
const types = wp.blocks.getBlockTypes();
// filter to just the core blocks
const core_blocks = types.filter(
type => type.name.startsWith( 'core/' )
);
// grab just the names
const block_names = core_blocks.map( type => type.name );
// display in the console
console.log( block_names );
@vburlak
Copy link
Author

vburlak commented Sep 7, 2022

Use this while Gutenberg Editor screen is open

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment