Quickadd adds templater script twice

What I’m trying to do

I use the Quickadd plugin to automate a new project creation.
This is my setup:

  1. is the general template
  2. is to activate a cursor placement, so 5. gets retuned there.
  3. is the templater script I want to run and this is the code. Just a simple suggester…
async function datePicker(tp) {
    const selectedOption = await tp.system.suggester(
        ['No Date given!', 'Select Date!'], 
        [1, 2], 
        "What's the completion date?"

    if (selectedOption === 1) {
        return 'No Date given!'.fontcolor("green");
    } else if (selectedOption === 2) {
        await app.commands.executeCommandById('nldates-obsidian:nlp-picker');
        return '';
    } else {
        return 'Nothing was indicated!!!'.fontcolor("red")

module.exports = datePicker;

Things I have tried

I have tried to reorganize the quickadd macro, trying to figure out how it works to understand why the script gets added twice. I have no clue why it does that, and I suspect that it is a bug. Everything else works fine.
To clarify, it gives me the suggester prompt twice. If I call the script on its own, it does not do that.

Does anyone know what I am doing wrong or is this just a bug?


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