[FEATURE REQUEST] how to get command id
Not sure this is a request because it might be that there's such a feature. I use quickadd and meta bind. I would like to make a button that would trigger a quick add action.
style: primary
label: abcdef
id: add-record-button
action:
type: command
command: [command]
Hi @xsevy
If you use app.commands.listCommands().filter(c => c.id.includes('choice')) in the developer tools console, you can see all the command IDs.
For example:
You can open the developer tools with CTRL+SHIFT+i. CMD instead of CTRL if you're on Mac.
Hope this helps!
You can get slightly better formatting if you use this:
console.table(app.commands.listCommands().filter(c => c.id.includes('choice')))
As for whether this is a feature, it might be useful to add a 'Copy ID' button somewhere :)
QuickAdd might not, but Meta Bind has such a command:
Cmd/Ctrl-P to open the command palette: Meta Bind: Select and Copy Command ID aka obsidian-meta-bind-plugin:copy-command-id