-
Hello, I have an issue. What I am trying to do is when I create a note inside of a certain folder, this template pops. Everything appears to be working except for deleting the original Untitled note. Basics, it is supposed to create a new folder by prompting for a name then append it after YYYY MM - . Then it is supposed to create four notes inside using templates and all of them appear to be fine with no issues. However, for some reason, I am getting a path is undefined error and aborting. Now my issue looks like all the path calls actually worked so I am confused. The original Untitled.md note is never removed.
I apologize if this is something easy, but I don't know javascript at all and am very new to using templates. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
According to the Obsidian API docs, you need to pass a TFile to You can use tp.file.find_tfile to get a TFile by it's string path. |
Beta Was this translation helpful? Give feedback.
Let me know if you need more help with this specific issue, I think we've resolved this by not creating a file at all, as per our conversation in the Obsidian Discord.