QuickAdd - Cursor at Start of Note After Templater Runs (Works Manually) #804
Replies: 1 comment
-
Hi everyone, Quick follow-up to my original post about cursor placement with QuickAdd and Templater for daily notes. I've done some further testing and have a key new finding: My daily note Templater script (which has no explicit cursor commands) now works perfectly when run manually via the Templater plugin – the cursor correctly defaults to the end of my "Activity Log" timestamp line. New Finding Has anyone else experienced this, or does anyone know if there's a QuickAdd setting that controls this final cursor state, or if this might be the default behavior after a QuickAdd process finishes? Thanks! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Howdy Gang,
I'm very new to Obsidian and its plugins so I apologise for my ignorance.
I'm having a cursor placement issue with QuickAdd and Templater for my daily notes.
Problem:
When creating a daily note via a QuickAdd "Template Choice", the cursor ends up at the start of the file. However, if I manually insert the same Templater template into a blank note, the cursor correctly defaults to the end of the inserted content (specifically, after an "Activity Log" timestamp line).
This means the Templater script itself is working correctly regarding content and default cursor placement when run in isolation. The issue appears when QuickAdd orchestrates the process.
Key Findings:
tp.file.cursor()
commands (neither embedded nor standalone). It relies on Templater's default end-of-content cursor placement.<% tp.file.cursor() %>
in Templater caused parsing errors, so that's not a viable fix. Standalonetp.file.cursor();
in Templater resulted in a different, incorrect cursor position.Question:
Could QuickAdd be performing an action after Templater finishes (like a file rename that refocuses the view, or an explicit "move cursor to start" command) that overrides where Templater naturally leaves the cursor?
My QuickAdd "Choice" Setup:
{{DATE:YYYY-MM-DD}} - Daily Log
Am I using QuickAdd correctly?
Any insight into QuickAdd's order of operations or settings that might influence the final cursor position after a Templater template is processed would be very helpful. Is there a way to preserve Templater's default cursor position?
Any clarity on this would be enormously appreciated! I've spent half the day working on a cursor!
Thanks!
-w
Files for context:
daily-note-template.md
20250520 - Daily Log.md
Beta Was this translation helpful? Give feedback.
All reactions