Human Made Gutenberg Tools
A place to bundle useful reusable Gutenberg components and other tools.
What does this include?
- Post Select button. Provides a media modal like user experience for selecting single or multiple posts. It supports searching, filtering, sorting and custom post types (and taxonomies). stying to work better in the sidebar.
- More Sidebar controls. Other components wrapped up in as standardised sidebar control components.
Install as a plugin, mu-plugin, or you can include it in your theme/plugin.
You will need to run
npm install && npm run build in in the hm-gutenberg-tools directory to ensure all the built files are available (In the future I hope to make this step redundant and provide built release versions).
Note that if you are including in a theme (or anywhere outside of plugins/mu-plugins directories) you must define
HM_GB_TOOLS_URL. For example
define( 'HM_GB_TOOLS_DIR', get_stylesheet_directory() . '/lib/hm-gutenberg-tools' ); define( 'HM_GB_TOOLS_URL', get_stylesheet_directory_uri() . '/lib/hm-gutenberg-tools' );
Then you should specify the script
hm-gb-tools-editor as a dependency of the script in which you are using it.
HM Gutenberg Tools then exposes all functionality globally as
window.hm. You can then use reference this in your project in much the the same way that you would use any other components from Gutenberg.
Post Select UI
npm run buildBuilds a production version of the code.
npm run watchWatches for changes and builds development versions of the code.
npm run lintLints your JS and fixes your code.
- Support for i18n.
- Refactor how it works for compatability with WordPress 5.0
- Use core data store
- Use custom endpoint to fetch content to handle multiple post types.
- Deprecate EditableHTML. You can now just use the Gutenberg component
wp.editor.RichTextand set the
- Updates to work with the latest version of Gutenberg (3.5).