Things I have tried
Hi!
I am facing issues with running user scripts using the Templater community plugin.
I followed the instructions step by step here: How To Use Templater JS Scripts - Obsidian Publish
I created a ‘Templaters’ folder and created a file called Notice where I the following template:
<%* tp.user.notice(tp) %>
I also created a Scripts folder and created a notice.js file where I put the following:
async function notice(tp) {
const text = await tp.system.prompt(“What’s Good?”)
new Notice(text, 5000)
}
module.exports = notice
I then tried to insert the Notice template into a new file but got the following error: Template parsing error, aborting. tp.user.notice is not a function.
Hope to get some help on this!
p.s. I’ve ensured that my settings are correct i.e. specifying the scripts folder and templaters folder.
Thank you!