Live Template Results shows Templater output while you edit

Read Templater results in Live Preview and edit their source.

MIT · no telemetry · core features free

A project note with an owner title, hours, budget and calculation result.
Open larger
version
1.1.0
released
downloads
27
review
Passed
health
Excellent
license
MIT
listed for
Desktop, Mobile
obsidian
1.13.4 or later

App checks use desktop Obsidian with Templater 2.26.0; physical mobile devices and arbitrary user scripts were not tested.

Directory facts fetched from community.obsidian.md/users/theluckystrike.

About Live Template Results

You use Templater dynamic commands and want to see their output while writing a trusted note in Live Preview.

Enable a trusted note to see a command such as <%+ 1 + 1 %> show 2 in Live Preview. Move into the result to edit its original command. The command stays in your Markdown source.

Templater handles execution through Obsidian's Markdown renderer. Only enable scripts you trust: they can change files or send note data to services.

A note with template results, editable commands, and refreshed resultsPlay demo

Free features

Results in Live Preview

Single-line dynamic commands show plain text at their command position. The renderer receives the owner note path, even when another note is active. Empty output shows an empty-result label.

Edit the source command

Click a result or move the cursor into its range to expose the command. Leaving it restores the cached result without another script run. Editing the note discards cached results, so refresh after the edit.

The project note exposes a dynamic command for source editing.
Open larger

Enable a trusted note

Use Enable template results in this trusted note to save an enable choice for its path. Disable template results in this note clears its cached results and takes priority over Pro rules. Templater still controls Reading view.

An unenabled note shows its original dynamic commands.
Open larger

Refresh and inspect errors

Refresh runs eligible commands through a serial queue, excluding code, frontmatter and comments. Failures leave source visible with a message. Stale output is discarded after a source change, but that doesn't stop a script already running.

A failed command remains editable beside a message about its missing result.
Open larger

Manual note enablement, editor results and refresh are free; automatic rules, property refresh and the results panel need Pro.

Pro features

Pro costs $5 a month or $15 one time through GitHub Sponsors. One sponsorship turns on Pro in every plugin that has it.

Enable rules by folder or property Pro

Enable trusted folders and their subfolders, or require a chosen property to be Boolean true. A folder named Work doesn't match Workshop. Review matching notes before adding a rule because it permits their commands to run.

Plugin settings show trusted folder and Boolean property rules.
Open larger

Refresh after selected property changes Pro

Choose comma-separated property names to refresh open enabled notes when those values change. Changes during a render don't request another refresh. Avoid watching a property that your script writes after rendering, since that can trigger another run.

A project total reflects a changed hours property.
Open larger

Results and errors panel Pro

Open the panel to inspect cached commands, output and errors grouped by owner path. Opening it doesn't rerun scripts. Closing an editor removes that editor's results from the panel.

A side panel lists cached commands and results beside their project note.
Open larger

Set up Live Template Results

needs

  • Obsidian 1.13.4 or later
  • Install and enable Templater separately; app checks use version 2.26.0.
  • Use single-line dynamic commands in Live Preview and review their code before enabling results.

steps

  1. Copy main.js, manifest.json and styles.css into .obsidian/plugins/live-template-results/, then enable the plugin. Install and enable Templater separately.

  2. Create a test note with a heading, a blank line and <%+ 1 + 1 %>.

  3. Switch to Live Preview, read the command, then run Enable template results in this trusted note.

  4. Move the cursor to the heading to see 2, then move into the result to edit the command.

  5. After editing the source, run Refresh template results in this note.

If the app can't find a new plugin yet, try again later. Obsidian says a plugin that passes the review shows in the app within 24 hours.

How to show Templater results in Obsidian Live Preview

Known limits of Live Template Results

  • Only supported single-line dynamic commands produce widgets; multiline commands, block quotes and four-space or tab-indented lines are excluded.
  • A command ends at the first %> on its line, so that delimiter cannot appear inside a script string.
  • A backtick without a closing match can exclude later commands in its paragraph, and results are plain text rather than rendered Markdown.
  • Editing source discards that editor's cached results; use refresh to run the changed commands.
  • Each open editor has its own cache and render jobs, so refreshing two editors of one note can run separate jobs.
  • Renaming a note removes the old manual enable choice; enable the new path again unless a Pro rule applies.
  • Discarding stale output cannot stop a running script, and a script that does not finish holds the render queue.
  • A script that writes a watched property after rendering can trigger another Pro refresh.
  • Trusted Templater scripts can change files or send note data to author-selected hosts before GitHub Sponsors sign-in.
  • Physical mobile devices, arbitrary user scripts and their external services, live GitHub authorization and real payments were not tested.

Need a change for your team? I build custom Obsidian plugins and features.

Questions about Live Template Results

Does the plugin save computed results in my note?

No, results live in an editor cache. The source command stays in the file, though Templater scripts can make their own file changes.

Which dynamic commands are outside this version?

Multiline commands, block quotes and lines indented by four spaces or a tab are excluded. A command ends at the first %> on its line, so don't use that delimiter inside a script string.

What happens if I rename an enabled note?

The rename removes the manual choice for the old path. Enable the new path again unless a Pro rule already enables it.

Can a running script be cancelled?

The plugin discards results that become obsolete, but can't stop a script that has started. A script that doesn't finish holds the render queue until it finishes or you reload the plugin.

Network use

Opening, enabling or refreshing trusted Live Preview notes can run Templater scripts that send note names, paths or text to author-selected hosts. Pro sign-in sends a client ID, scope and device code to github.com; sponsorship queries send your token to api.github.com. Those checks run after sign-in, on Refresh or cache expiry, and send no vault data; script network access can happen before sign-in.

Read the full network disclosure

Questions or ideas?

Tell me what is broken in Live Template Results, or what it should do next.

Send feedback

Live Template Results 1.1.0, MIT license

MIT · no telemetry · core features free