editor obcommands don't modify selections
jbytes1027 opened this issue · 2 comments
jbytes1027 commented
editor obcommands don't respect selections like their respective obsidian keybindings do. For instance, Ctrl+b by default toggles bold formatting of the current selection in visual mode, but obcommand editor:toggle-bold in visual mode with a selection simply inserts **** wherever the cursor was in normal mode. This makes these commands pretty useless. The problem with the surround commands is that you can't toggle on and off a surround.
MiracleXYZ commented
I have the same issue. I have a Templater command with tp.file.selection()
, and it doesn't work either.
jbytes1027 commented
Got this working here. Though I changed obcommand from an editor command to an action commands.