Templater is inserting [object Promise] under text being rendered

First, search the help docs and this forum. Maybe your question has been answered! The debugging steps can help, too. Still stuck? Delete this line and proceed.

What I’m trying to do

I am trying to add ‘{{qotd}}’ to my template… But it keeps rendering statically in the template.
I had an idea to break up {{qotd}} into components that are assembled with the template is used.

let quote = "qotd"
let obrace = '{{'
let cbrace = '}}'
//add title
tR += "# " + tp.date.now("YYYY-MM-DD")  + "\n"
// assemble the qotd placeholder
tR += obrace + quote + cbrace  
// insert time template 
tR +=  "\n" + tp.file.include("[[T]]") + "\n"

It works, but it adds [object Promise] to the bottom

Thoughts on what could be going wrong?

For starters you need to do await tp.file.include(...)

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.