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
Copy file name to clipboardExpand all lines: docs/docs/Choices/TemplateChoice.md
+28-1Lines changed: 28 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,11 +5,38 @@ title: Template
5
5
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.
6
6
7
7
## 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**.
9
9
10
10
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.
11
11
12
12
## 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
+
13
40
**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.
14
41
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.
0 commit comments