obsidian-text-format icon indicating copy to clipboard operation
obsidian-text-format copied to clipboard

Feature Request - Commands from context menu

Open hmz-97 opened this issue 3 years ago • 2 comments

Thanks for the great plug-in. Would be amazing if it could add a section on the context menu (Shift F10 on Windows/Control + Click on Mac) with all the format options. It would make it much quicker to use then Command Palette, and less error prone than hotkeys.

hmz-97 avatar Jul 14 '22 15:07 hmz-97

From https://marcus.se.net/obsidian-plugin-docs/user-interface/context-menus and refer to https://github.com/TfTHacker/obsidian42-text-transporter/blob/0edb6750a0b17bcceaf065f27bee4dfa086c6cd0/src/ui/PluginCommands.ts#L188, I know how to add item to context menu.

However, what I want to do is to add the commands into the second level of the item in context menu, like

Cut
Copy
Paste
Paste as plain text
Select all
---
Text Format
|--- Lowercase
|--- Uppercase
|--- ...
---
...

But for now, I cannot find a way to add a second-level item. 😢

Benature avatar Aug 21 '22 14:08 Benature

This is perfect, I would only add the checkbox to add wrappers in a granular way so the ones enabled appear like this:

...
---
wrappers
|--- Custom wrapper 1
|--- Custom wrapper 2
...

And maybe also configurable hotkeys for them 🤔

I will check if i find a way to open the second level-item but I think it's above my paygrade 😂

lveillard avatar Aug 29 '22 06:08 lveillard

I recently learned about the plugin -- Commander (https://github.com/phibr0/obsidian-commander), which allows you to add commands to the context menu custom.

As a result, this plugin is not planned to add commands to the content menu, as Commander is good enough.

Benature avatar Dec 25 '23 10:12 Benature