You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: improve prompt labeling for VALUE/MACRO and multi choices
* feat: add labels and placeholders for prompts
* feat: use option syntax for VALUE labels
* docs: clarify VALUE option default syntax
* refactor: use sentinel delimiter for VALUE label keys
* test: key VALUE label requirements via parser
* refactor: share VALUE label key helper
* refactor: centralize VALUE key handling
* test: add valueSyntax coverage
* feat: add label option to macro syntax
* fix: require label option for macro labels
Copy file name to clipboardExpand all lines: docs/docs/Choices/MultiChoice.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,3 +9,7 @@ Multi-choices are pretty simple. They're like folders for other choices. Here ar
9
9
To actually add something in this "folder", you need to drag it in! This is not easy to do when it is the first item in the multi-folder.
10
10
11
11
Make sure the multi is unfolded (as it is in the screenshot). Click the drag handle of one of the choices you want to add and drag it to just below and to the right of the drag handle for the multi. When successful, the choice will be indented under the multi.
12
+
13
+
## Placeholder text
14
+
15
+
You can optionally set a placeholder for each Multi choice. This text shows up in the choice picker search box when you open the multi, which is handy for complex menus or grouped workflows. Leave it empty to keep the default placeholder.
Copy file name to clipboardExpand all lines: docs/docs/FormatSyntax.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,11 +10,14 @@ title: Format syntax
10
10
|`{{VDATE:<variable name>, <date format>\|<default>}}`| Same as above, but with a default value. If you leave the prompt empty, the default value will be used instead. Example: `{{VDATE:date,YYYY-MM-DD\|today}}` will use "today" if no input is provided. Default values can be any natural language date like "tomorrow", "next monday", "+7 days", etc. Short aliases like `t`, `tm`, and `yd` work here too. **Note:** If your date format contains pipe characters (`|`), you'll need to escape them as `\|` or use square brackets like `[|]` to avoid conflicts with the default value separator. |
11
11
|`{{VALUE}}` or `{{NAME}}`| Interchangeable. Represents the value given in an input prompt. If text is selected in the current editor, it will be used as the value. When using the QuickAdd API, this can be passed programmatically using the reserved variable name 'value'. |
12
12
|`{{VALUE:<variable name>}}`| You can now use variable names in values. They'll get saved and inserted just like values, but the difference is that you can have as many of them as you want. Use comma separation to get a suggester rather than a prompt. |
13
-
|`{{VALUE:<variable name>\|<default>}}`| Same as above, but with a default value. For single-value prompts (e.g., `{{VALUE:name\|Anonymous}}`), the default is pre-populated in the input field - press Enter to accept or clear/edit it. For multi-value suggesters without `\|custom`, you must select one of the provided options (no default applies). |
14
-
|`{{VALUE:<options>\|custom}}`| Allows you to type custom values in addition to selecting from the provided options. Example: `{{VALUE:Red,Green,Blue\|custom}}` will suggest Red, Green, and Blue, but also allows you to type any other value like "Purple". This is useful when you have common options but want flexibility for edge cases. **Note:** You cannot combine `\|custom` with a default value - it's either one or the other. |
13
+
|`{{VALUE:<variable name>\|label:<helper text>}}`| Adds helper text to the prompt for a single-value input. The helper appears below the header and is useful for reminders or instructions. For multi-value lists, use the same syntax to label the suggester (e.g., `{{VALUE:Red,Green,Blue\|label:Pick a color}}`). |
14
+
|`{{VALUE:<variable name>\|<default>}}`| Same as above, but with a default value. For single-value prompts (e.g., `{{VALUE:name\|Anonymous}}`), the default is pre-populated in the input field - press Enter to accept or clear/edit it. For multi-value suggesters without `\|custom`, you must select one of the provided options (no default applies). If you combine options like `\|label:...`, use `\|default:<value>` instead of the shorthand (mixing option keys with a bare default is not supported). |
15
+
|`{{VALUE:<variable name>\|default:<value>}}`| Option-form default value, required when combining with other options like `\|label:`. Example: `{{VALUE:title\|label:Snake case\|default:My_Title}}`. |
16
+
|`{{VALUE:<options>\|custom}}`| Allows you to type custom values in addition to selecting from the provided options. Example: `{{VALUE:Red,Green,Blue\|custom}}` will suggest Red, Green, and Blue, but also allows you to type any other value like "Purple". This is useful when you have common options but want flexibility for edge cases. **Note:** You cannot combine `\|custom` with a shorthand default value - use `\|default:` if you need both. |
15
17
|`{{LINKCURRENT}}`| A link to the file from which the template or capture was triggered (`[[link]]` format). When the append-link setting is set to **Enabled (skip if no active file)**, this token resolves to an empty string instead of throwing an error if no note is focused. |
16
18
|`{{FILENAMECURRENT}}`| The basename (without extension) of the file from which the template or capture was triggered. Honors the same **required/optional** behavior as `{{LINKCURRENT}}` - when optional and no active file exists, resolves to an empty string. |
17
19
|`{{MACRO:<MACRONAME>}}`| Execute a macro and write the return value here. |
20
+
|`{{MACRO:<MACRONAME>\|label:<label>}}`| Executes the macro but shows the label as the placeholder when the macro prompts you to choose an export from a script object. This is helpful when multiple macro calls show similar lists. |
18
21
|`{{TEMPLATE:<TEMPLATEPATH>}}`| Include templates in your `format`. Supports Templater syntax. |
19
22
|`{{GLOBAL_VAR:<name>}}`| Inserts the value of a globally defined snippet from QuickAdd settings. Snippet values can include other QuickAdd tokens (e.g., `{{VALUE:...}}`, `{{VDATE:...}}`) and are processed by the usual formatter passes. Names match case‑insensitively in the token. |
20
23
|`{{MVALUE}}`| Math modal for writing LaTeX. Use CTRL + Enter to submit. |
0 commit comments