Add template:insert error message to docs
Clarifies exact error returned when no file is active in Obsidian UI: "Error: No active editor. Open a file first." Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -210,7 +210,7 @@ obsidian sync:restore path="important.md" version=3 # Rollback
|
|||||||
6. **Stderr noise** — GPU/Electron warnings on headless are harmless; filter with `2>/dev/null`.
|
6. **Stderr noise** — GPU/Electron warnings on headless are harmless; filter with `2>/dev/null`.
|
||||||
7. **`daily:prepend`** inserts content after frontmatter, not at byte 0.
|
7. **`daily:prepend`** inserts content after frontmatter, not at byte 0.
|
||||||
8. **Use `eval`** to run arbitrary JavaScript against the Obsidian API (`app.*`).
|
8. **Use `eval`** to run arbitrary JavaScript against the Obsidian API (`app.*`).
|
||||||
9. **`template:insert`** inserts into the currently active file in the Obsidian UI — it does not accept a `path=` parameter. To create a file from a template via CLI, use `obsidian create path="..." template="..."` instead.
|
9. **`template:insert`** inserts into the currently active file in the Obsidian UI — it does not accept a `path=` parameter. If no file is open, it returns `Error: No active editor. Open a file first.` To create a file from a template via CLI, use `obsidian create path="..." template="..."` instead.
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
|
|||||||
@@ -257,7 +257,7 @@ obsidian template:insert name="weekly-review" # Insert template into t
|
|||||||
- `resolve` — Process template variables (`{{date}}`, `{{title}}`, etc.)
|
- `resolve` — Process template variables (`{{date}}`, `{{title}}`, etc.)
|
||||||
- Title and other variables can be passed as `key=value` for template rendering.
|
- Title and other variables can be passed as `key=value` for template rendering.
|
||||||
|
|
||||||
> **Note:** `template:insert` inserts into whichever file is currently active in the Obsidian UI — it does not accept a `path=` parameter. To create a new file from a template, use `obsidian create path="..." template="..."` instead.
|
> **Note:** `template:insert` inserts into whichever file is currently active in the Obsidian UI — it does not accept a `path=` parameter. If no file is open, it returns `Error: No active editor. Open a file first.` To create a new file from a template, use `obsidian create path="..." template="..."` instead.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ obsidian sync:restore path="important.md" version=3 # Rollback
|
|||||||
6. **Stderr noise** — GPU/Electron warnings on headless are harmless; filter with `2>/dev/null`.
|
6. **Stderr noise** — GPU/Electron warnings on headless are harmless; filter with `2>/dev/null`.
|
||||||
7. **`daily:prepend`** inserts content after frontmatter, not at byte 0.
|
7. **`daily:prepend`** inserts content after frontmatter, not at byte 0.
|
||||||
8. **Use `eval`** to run arbitrary JavaScript against the Obsidian API (`app.*`).
|
8. **Use `eval`** to run arbitrary JavaScript against the Obsidian API (`app.*`).
|
||||||
9. **`template:insert`** inserts into the currently active file in the Obsidian UI — it does not accept a `path=` parameter. To create a file from a template via CLI, use `obsidian create path="..." template="..."` instead.
|
9. **`template:insert`** inserts into the currently active file in the Obsidian UI — it does not accept a `path=` parameter. If no file is open, it returns `Error: No active editor. Open a file first.` To create a file from a template via CLI, use `obsidian create path="..." template="..."` instead.
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
|
|||||||
@@ -257,7 +257,7 @@ obsidian template:insert name="weekly-review" # Insert template into t
|
|||||||
- `resolve` — Process template variables (`{{date}}`, `{{title}}`, etc.)
|
- `resolve` — Process template variables (`{{date}}`, `{{title}}`, etc.)
|
||||||
- Title and other variables can be passed as `key=value` for template rendering.
|
- Title and other variables can be passed as `key=value` for template rendering.
|
||||||
|
|
||||||
> **Note:** `template:insert` inserts into whichever file is currently active in the Obsidian UI — it does not accept a `path=` parameter. To create a new file from a template, use `obsidian create path="..." template="..."` instead.
|
> **Note:** `template:insert` inserts into whichever file is currently active in the Obsidian UI — it does not accept a `path=` parameter. If no file is open, it returns `Error: No active editor. Open a file first.` To create a new file from a template, use `obsidian create path="..." template="..."` instead.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user