Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/aplauche/better-custom-classes-for-gutenberg/archive/refs/heads/main.zipBetter Custom Classes for Gutenberg adds a new custom classes pane in the block options panel. This field behaves similar to tags for a better custom class UX.
Description
Adds an extra "Custom Classes" pane to gutenberg blocks that behaves similar to tags. This allows for easy entry, deletion, and managment of utility classes on your blocks. A regex validator highlights classes that may be invalid. A "Copy All" button is also added for quickly transferring classes between blocks. On deactivation, classes will persist, but in the legacy Custom Class field under the advanced pane.
Clicking the star icon on a class will toggle whether to include it in your class library. This makes it show up as an autocomplete when applying classes to other blocks. You can view all the classes in your library on the dedicated class library settings page in the admin.
Installation
- Extract better-custom-classes-for-gutenberg.zip
- Upload the plugin folder to the
/wp-content/plugins/directory - Activate the plugin through the \'Plugins\' menu in WordPress
Screenshots
- Easily viewing classes with the Custom Class Pane
- An invalid class highlighted where the user added a period
Changelog
0.2.2
- Adds a loading state for settings screen
0.2.1
- Patch fatal bug in block editor for non-admins
0.2.0
- Overhaul class library management screen to be React powered instead of settings API
- Convert to using TokenList for management
- Fix bug with REST API endpoint (add schema)
- Add comma seperated support for class field
0.1.3
- Add colon to supported class characters for tailwind utils etc.
0.1.2
- Fix bug with WP 6.3 where saving on general options page throws error
0.1.1
- Add a filter to bail out if block does not support customClassName
0.1
- Initial plugin release