christianwannerstedt6k downloadsTurn lists into neatly formatted key-value lists.
This plugin for Obsidian makes creating formatted key-value lists a breeze.
A Key-Value list is basically a list containing multiple rows with pairs of keys and values. These can be useful in all kind of different contexts, especially when something is to be described with a range of different attributes. The idea with this plugin is to give lists like that some additional formatting, without the need of any extra input or customizations at all.
To create a key value list, all you need to do is to make sure the list row contains a specific delimiter. The default one used in this plugin is :. So, as an example, a simple list could look like this:
- First name: Donald
- Last name: Duck
- Gender: Male
This plugin will recognize these lists automatically and apply some basic formatting:
The plugin works in Reading view (markdown post-processor) and Live Preview (editor extension). In Source mode, lists are shown as plain markdown without formatting.
Here's a brief demonstration of the plugin in action::
If the value (or key) is too long to fit on the row, it will be properly wrapped to the next line.
It is possible to use other formats, e.g. bold text, links, tags, in both the key and value part.
Even if the plugin doesn't require any customizations at all, you can fine tune it a bit with some available settings. From the plugin settings page it's possible to change the delimiter, appearence etc.
It is possible to choose whether the plugin should be active for individual files by using the frontmatter property cssclasses:
nokeyvalue — disable the plugin for the file (overrides global settings)keyvalue — enable the plugin in both Live Preview and read modekeyvalue-edit — enable the plugin in Live Preview onlykeyvalue-read — enable the plugin in read mode onlyWhen none of these classes are set, the global plugin settings apply. The enable classes are useful when the plugin is disabled by default and you want to opt in on specific files.
You can right-align keys and/or values on a per-list basis using marker characters configured in the plugin settings (default for both: ;):
With the default delimiter : and markers ;:
- Total;:; 100
- Tax: 25
- Due: 125
The first row sets alignment for the entire list. Following rows use the plain delimiter. Alignment markers are not shown in the rendered output — only the delimiter itself is displayed.
Leave either marker setting empty to disable that alignment option.
In order for a list to be considered a Key-Value list by this plugin, every list item at every nesting level must contain a key-value pair. If one or more rows don't contain a key-value pair, the list will be ignored by the plugin.
Nested lists are supported. Indent child rows under a parent item in markdown and the plugin will render them as an indented key-value table in both Live Preview and Reading view.
Unzip the latest release into your <vault>/.obsidian/plugins/ folder.
Settings > Community pluginsCommunity plugins > BrowseKey-Value list