obsidian-editing-toolbar icon indicating copy to clipboard operation
obsidian-editing-toolbar copied to clipboard

How to add commands?

Open kwetter opened this issue 2 years ago • 1 comments

Hi there

first of all, thank you for taking time to develop such a plugin. I use it often and I think it has a lot of potential and usage. I tried to add custom commands but couldn't make it work. Can you give me a hint on how to proceed?

I have a css snippet where I define classes with different styles, colors, ect.. To apply them to text I use the span tag around it. How would I integrate this similar to the aleready existing alignment command in the toolbar? I tried in options to add a command, but how would I specify a command to wrap selected text into a certain span class. Can you elaborate how to achieve this?

thank you

kwetter avatar Nov 15 '22 19:11 kwetter

The commands supported by the plugin are already available in the obsidian, so you cannot create your own commands. Of course, many plugins support generate custom commands, such as quickadd, templater , and then add them in the editing torolbar. Here is an example of quickadd #21

cumany avatar Nov 19 '22 05:11 cumany