mProjectsCode / obsidian-meta-bind-plugin

A plugin for Obsidian to make your notes interactive with inline input fields, metadata displays, and buttons.
https://www.moritzjung.dev/obsidian-meta-bind-plugin-docs/
GNU General Public License v3.0
534 stars 42 forks source link

Support more literal types (such as lists) as values for the `option` argument #410

Open midas0441 opened 2 months ago

midas0441 commented 2 months ago

Please fill out these Check-boxes

Is your Feature Request related to a Problem or Annoyance?

No response

Describe the Feature you'd like

I would like to provide lists ([item1, item2, item3]) as an option. I tried to use option('[item1, item2, item3]'), but the YAML variable is assigned the value "[item1, item2, item3]". I don't want the double-quotes. I'd like the list [item1, item2, item3] to be assigned to the YAML variable. I'm aware of multiSelect but for a variety of reasons, I don't want to build the list by selecting items 1, 2 and 3 individually from a list of options. One reason is that another option is [item3, item4] and another is [item1, item3]. So you see, I have pre-defined lists that I'd like to provide as options to choose from.

Alternatives

No response

Additional Context

No response

mProjectsCode commented 2 months ago

Currently, that is not possible. The only data types supported are string | number | boolean | null

midas0441 commented 2 months ago

Hope this can be extended someday to other types, particularly lists.