Things I have tried
Below is the Buttons code:
name Mark As Done
type append template
action MetaEdit Complete Template
And below is the MetaEdit Complete Template:
<%*
const {update} = this.app.plugins.plugins["metaedit"].api
const {getPropertyValue} = this.app.plugins.plugins["metaedit"].api
const getMaegeAP = await getPropertyValue("maegeAP", "Maege.md")
await update("maegeAP", getMaegeAP + 20, "Maege.md")
await update("complete", true, tp.file.path(true))
-%>
What I’m trying to do
I have a button configured to append a template that has a Templater execution command, intended to update a frontmatter value in the current note using the MetaEdit API.
When I apply the template the normal way via the command palette the template functions as expected. It’s only when I apply the template via Buttons that the frontmatter value seems to change for a split second, then it reverts to the original value.
Looking through the Buttons issues in GH, it seems like this might be a known bug. I just thought it would be worth posting here in case anyone sees something in my code that stands out as an issue, or if anyone knows a workaround.