New Note Inheriting Tags


New Note Inheriting Tags


Creates a new note tagged with the tags from the note you currently have selected.

Each new note created can include a link back to the source note from which it came.

The link back can be contained in a task or as regular text.

Keywords: Inherit, auto tag




Link back (yes/no)


Link as task or text


Link prefix

async noteOption(app, noteUUID) {
const note = await app.notes.find(noteUUID);
const title =;
const tags = note.tags;
const new_uuid = await app.createNote("", tags);
const newnote = await app.notes.find(new_uuid);
var include_source = app.settings['Link back (yes/no)'] || 'yes';
var include_source = include_source.trim().toLowerCase() || 'yes';
var link_prefix = app.settings['Link prefix'] || '';
/* Boil down choice to a yes */
var yes_list = ['yes', 'y', '1', 'true', 't'];
include_source = true;
include_source = false;
/* Create link back to original note */
/* Assemble markdown link */
const link_text = link_prefix + "[" + title + "](" + noteUUID + ")";
/* User can choose to have link back placed in a task or as regular text */
var link_task_or_text = app.settings['Link as task or text'] || 'task';
link_task_or_text = link_task_or_text.trim().toLowerCase();
if(link_task_or_text == "text"){
}else if(link_task_or_text == "task"){
const taskUUID = await newnote.insertTask({ content: link_text });
/* Give feedback to user to correct settings. */
app.alert('When "Link back (yes/no)" is true, "Link as task or text" must be set to "task" or "text".');
/* Bring user to the new note */
app.navigate("" + new_uuid);