TemplaterRunMode
Templater’s RunMode enum, which says what kind of render a TemplaterRunningConfig describes.
The numeric values ARE Templater’s, and the members are listed in its declaration order so the two can be compared line for line. They are written out explicitly all the same, because they cross into Templater as integers — never renumber them.
Import:
import type { TemplaterRunMode } from 'obsidian-dev-utils/obsidian/templater';Signature:
export enum TemplaterRunModeMembers:
| Member | Value | Description |
|---|---|---|
CreateNewFromTemplate | 0 | Render the template into a newly created file. |
AppendActiveFile | 1 | Render the template and append the result to the active file. |
OverwriteFile | 2 | Render the template and overwrite a given file with the result. |
OverwriteActiveFile | 3 | Render the template and overwrite the active file with the result. |
DynamicProcessor | 4 | Render the template on demand, for a caller that wants the resulting text rather than a file written. This is what parseTemplate uses. |
StartupTemplate | 5 | Render the template as a startup template. getTemplaterFunctions uses it for the throwaway config it builds, because that config renders nothing. |
Links to this page: