Hi @frdmsun, thanks for the suggestions. I’ll try to add the option to skip saving the class to the database. For pasting multiple class names, I need to look into it a bit more. I’m not sure if it is doable or not. Anyway, I’ll share an update soon.
Thank you very much for using the plugin.
Thread Starter
Sunny
(@frdmsun)
The simplest solution would be to have an option that restores the default WP class functionality in the advanced tab. This way classes could be manager both ways.
Hi @frdmsun ! I’ve just released a new version with the Add classes without saving to the database feature. You can enable it by toggling Press Space to add class names without creating them in Preferences inside the CSS Class Manager settings modal. When this option is enabled, you can press Space to add a class without saving it to the database. You can also add multiple class names, just copy/paste them into the input field and press Space.
Here’s a screencast for more clarification: https://github.com/ediamin/css-class-manager/wiki#how-to-add-css-classes-without-saving-them-to-the-database-or-class-manager-list
I hope this meets your requirement. Thanks for the feature request! Let me know if you have any questions.
Thread Starter
Sunny
(@frdmsun)
Thanks looks good!
If anyone is interested here is a simple way to add the default Advanced > Classes field back if you need it.
// Add the Advanced > Classes field back
add_action('enqueue_block_editor_assets', function () {
wp_add_inline_script(
'css-class-manager-script',
"wp.hooks.removeFilter('editor.BlockEdit', 'css-class-manager/block-editor/hide-core-inspector-control');",
'after'
);
}, 100);
Thank you Sunny. Glad to hear it helped and thanks for sharing the snippet 👍.
I am going to close this thread. If anyone runs into issues or has follow up questions, feel free to open a new topic.