shabegom / buttons

Buttons in Obsidian
The Unlicense
455 stars 47 forks source link

Chain multiple Buttons on single click #168

Closed hydraInsurgent closed 5 months ago

hydraInsurgent commented 1 year ago

Hi @shabegom ,

I have a suggestion to make for the buttons plugin, a feature request if implemented will improve the usability of this plugin a lot.

I have a particular scenario where I want to chain 2 actions on a single button, I want to add some text, and then trigger a custom command. If this could be done in a single click then it would be awesome. Currently, I have made a workaround by doing all inside a macro and I am calling this macro that internally first pastes the text I need and then after a delay of 200 ms calls the custom command.

I have tried chaining commands as shown below but this does not work and only the command that is later gets executed.

name Manage FIeld
type append text
action exercise::
type command
action Metadata Menu: Manage field at cursor

^button-manage-field

If you can consider this plugin I would be highly thankful, I am willing to put in some effort myself for this feature, but I don't have knowledge of Plugin building, will take some guidance from you if you can provide it, I have a basic knowledge of typescript.

-Manu

shabegom commented 5 months ago

similar to #188