Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A way to set checkbox status directly to certain value #781

Open
defr0std opened this issue Nov 26, 2024 · 0 comments
Open

A way to set checkbox status directly to certain value #781

defr0std opened this issue Nov 26, 2024 · 0 comments

Comments

@defr0std
Copy link

🚀 The feature, motivation and pitch

Currently, you can toggle the checkbox state between two values. For example:

require("obsidian").util.toggle_checkbox() -- toggles only between "[ ]" and "[x]"
require("obsidian").util.toggle_checkbox({" ", ">"}) -- toggles only between "[ ]" and "[>]" 

It would be great if I could set the checkbox state directly to a certain value, without toggling it:

require("obsidian").util.set_checkbox(">") -- sets to "[>]" regardless of the current value

The motivation for this is to use shortcuts to quickly change the state to any value. Example from real life - the task is done, but I discovered something and I need to follow up on it. I would like to change "[x]" to "[>]" directly in one click.

Alternatives

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant