Tp.file.cursor line still presented in a file

Last code block with a cursor is not working and somehow this line still stays in newly created file

What I’m trying to do

Please help, why templater tp.file.cursor(1) command is not working?

<%* 
const type = await tp.system.suggester(["post-idea", "my-projects"], ["post-idea", "my-projects"]); 
%>---
tags: <% `${type}` %>, notebook, essay
date: "{{date}}"
---

## Note

<%  tp.file.cursor(1)  %> 

Things I have tried

manipulating <%* blog but tags needed to be created first so this blog stays on top of the fille

Lately, it has happened to me too.
I removed the line. I know where I want to go after triggering a template, even if I have several different types.

But of course, that is no real solution.
I don’t know what happened at the plugin’s end…recently there has been one update only.

Otherwise I cannot think of anything else but this: whatever comes above in commands that we run doesn’t give time for that other line to be executed.
I am not a coder, so I’ll pass this to someone else.

Firstly I though it was due to first code block <%* stealing focus, making last block just plain text, canceling it’s execution

You are closing with %>, so it should be okay.
It’s not quite clear to me how Templater prioritizes bits of code. Sometimes I see it pastes content it can first, then handles the suggester part (which you have here as well), and maybe after that it thinks it’s done?
Not clear to me.
Not the first time someone complains about tp.file.cursor. Maybe search with tp.file.cursor on the forum.

1 Like