Skip to content

Commit b4cd53d

Browse files
committed
docs: add template insertion mode
1 parent ac08ec5 commit b4cd53d

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

docs/docs/Choices/TemplateChoice.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,38 @@ title: Template
55
The template choice type is not meant to be a replacement for [Templater](https://github.com/SilentVoid13/Templater/) plugin or core `Templates`. It's meant to augment them, to add more possibilities. You can use both QuickAdd format syntax in a Templater template - and both will work.
66

77
## Mandatory
8-
**Template Path**. This is a path to the template you wish to insert. Paths are vault-relative; a leading `/` is ignored.
8+
**Template Path**. This is a path to the template you wish to insert. Paths are vault-relative; a leading `/` is ignored. When **Insert into active note** is enabled, this path is only required if the template source is set to **Use template path**.
99

1010
QuickAdd supports both markdown (`.md`) and canvas (`.canvas`) templates. When using a canvas template, the created file will also be a canvas file with the same extension.
1111

1212
## Optional
13+
### Insert into active note
14+
Enable **Insert into active note** to insert the template content into the currently active Markdown note instead of creating a new file.
15+
16+
When enabled, QuickAdd requires an active Markdown note. The following settings are ignored because no new file is created:
17+
- File name format
18+
- Create in folder
19+
- Append link
20+
- File already exists behavior
21+
- Open file
22+
23+
**Insertion placement** controls where content is inserted:
24+
- **Current line (cursor)**
25+
- **Replace selection**
26+
- **After selection**
27+
- **End of line**
28+
- **New line above**
29+
- **New line below**
30+
- **Top of note**
31+
- **Bottom of note**
32+
33+
**Template source** controls how the template is chosen:
34+
- **Use template path** – use the Template Path setting
35+
- **Prompt for template at runtime** – choose a template file when running the choice
36+
- **Use another Template choice** – select another Template choice and reuse its template path (only the template path is reused; other settings on that choice are ignored)
37+
38+
If the template contains YAML frontmatter, QuickAdd merges it into the active note's frontmatter. The rest of the template is inserted according to the placement you choose.
39+
1340
**File Name Format**. You can specify a format for the file name, which is based on the format syntax - which you can see further down this page.
1441
Basically, this allows you to have dynamic file names. If you wrote `£ {{DATE}} {{NAME}}`, it would translate to a file name like `£ 2021-06-12 Manually-Written-File-Name`, where `Manually-Written-File-Name` is a value you enter when invoking the template.
1542

0 commit comments

Comments
 (0)