How to trigger templater code in a file?

Suppose I inserted some templater code into my note. How to I actually trigger the code, so that it is replaced with the result? It doesn’t happen automatically.

1 Like

There’s a Templater command available in the command palette :blush: : Templater: Replace templates in the active file
(You should be able to trigger the command from a hotkey too. On Mac, by default it’s option + R but I can’t speak for Windows but if I had to guess, I’d say Alt + R )

1 Like

If not what Pch says, then …

How did you insert it? Like this?

  1. Create the template with the code and make sure it is in the designated folder for templates
  2. Go to the note where you want to insert the template
  3. CMD P (CTRL P)
  4. Templater > Open insert template modal
  5. Select and insert the relevant template

If not what neither @Pch , nor @anon45210282 says… :slight_smile:

If you add in a template like Hampton says, you’ve also got the option to assign a hotkey to that specific insertion through the settings panel of Templater.

1 Like

Yes, that’s how I inserted it.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.