Closed jan-dh closed 1 year ago
Yep, this is a little tricky in practice, and we'll likely add a commands
setting to the config. That's because you can include h1
, etc either in the formatting
setting, or at the top level buttons
, and just makes it annoying to trawl through those options. In addition, maybe some people only want the heading option available in the command palette, but not a button (so in that case, it's not disabled per-se, just not available). That starts to get into more the https://github.com/verbb/vizy/issues/183 territory when you actually disable extensions altogether (so people can't paste in headings).
And there was a reason to not include all the available nodes as commands, so being able to tailor that a little easier will be the other goal here.
For now, you can modify the available commands following this user guide
Updated in 2.1.1. Vizy will now filter out any options you set in the command palette if the button isn't enabled.
You can now also provide a commands
option in editor config to manage options.
Describe the bug
The command pallet shows me some options (headings for example) that were disabled in my JSON config file. This is the command pallet:
And my config file:
I would expect the command pallet to respect the heading restrictions I made in the config file. Otherwise it's very hard for me to prevent people from picking an H1 for example.
Steps to reproduce
Craft CMS version
Craft CMS 4.4.7.1
Plugin version
2.1.0
Multi-site?
"yes"
Additional context
Love the command pallet btw, gives a very Notion kind of vibe, really like it.