Remove Title in “New Draft with Template” Action

I use the ‘New Draft with Template’ action frequently, but haven’t figured out a simple way to remove the Title of the Template Draft when creating a new draft from the template.

Many of the templates that I use begin with things like:

“Hi <|>,” Or “# ”

When using prompts to select a Template Draft these first lines are clearly not very helpful. So, instead I include a title in the template draft and simply delete it in the new draft…

Is there a way to remove the Title in the new draft, along with setting the location of the cursor at “<|>” as usual? Would love some tips/help.

There is a line of code in that action that sets the content of the new draft to the processed content of the selected template draft.

d.content = d.processTemplate(template.content);

Try changing it to this

d.content = d.processTemplate(template.lines.shift().join("\n"));

I have not tested it, but this should get the content of the template draft as an array of lines, drop the first line, the title, and then join the remaining lines with new line characters. That is them processed and set as the content of the new draft.

1 Like

After doing some additional searching, I ended up finding a solution very similar to this. New Draft with Template - #3 by agiletortoise Seems obvious in retrospect :man_facepalming: