Quick Add

QuickAdd: Create a feature to add a template to a new note and write the backlink in the current cursor position. Base it on Obsidian's QuickAdd template choice: https://quickadd.obsidian.guide/docs/Choices/TemplateChoice

@coding @next @Alta Energia



Feature: add support to get tasks that only have a deadline for the current day on the Publish schedule to jot functionality



Feature request: Publish schedules from future days into respective daily jots.
Longer description
@coding @Media Energia @>90 min @next



Change function Publish schedule to Jot to mirror tasks to the daily jot, once the feature is shipped and we have plugin API calls for that
@coding@Alta Energia @computador 



You can download the plugin in the Plugin Directory page or use Amplecap to duplicate this page

name

Quick Add

icon

Playlist Add

description

A plugin to add information quickly into other notes, without leaving the current note

setting

Removed Notes

instructions


WIth this plugin, you can add content to specific notes in your system without leaving the current screen/note. For it, you need to:

Open Quick Open using Ctrl + O

Type one of the commands or the plugin name in the field

Fill out the information you want to add, the format it should have and the home note



Here are the current options you can choose, this list will grow as the plugin gets updated:

Insert content inside a note (Quick Open)

It will open a general alert, follow the previously described steps to use it

The content will be added to the top of the note

Add journal entry to today's jot (Quick Open)

It will open an alert, asking you for the content to add to the current day's jot

Additionally, there's an option to add the current time, only with the current hour and minutes, before the text to be added

The content will be added to the top of the note

Insert time now (Curly brackets)

Inserts the current time to the current note, with the same functionality as the default {now} function, but with a style similar to Logseq and Roam Research

Can be accessed using the curly brackets, for quick access, just type {now and choose the plugin option in the dropdown menu

Publish schedule to Jot (Jots mode)

Publishes all tasks schedule to today in the daily jot

You can prevent tasks from specific notes from getting published by changing the Removed Notes plugin setting.

Add multiple notes by adding a semicolon ; symbol in between the noteUUIDs.

P.S. - It will only get tasks scheduled today that are still incomplete. It won't get overdue tasks from before today, nor completed tasks for today

Schedule task as "All Day" (! Task command)

Changes the Start Time of a task as Today at 12am and it's duration to 1440 minutes

For quick access, just type !all inside the task content


linkKnown issues:

If you try to insert a task into any note and the text of that task is multi-lined, it will show an error

If you schedule a task as "All Day" through the plugin while in Jots or Notes mode, and the task does not have a set Start Time, you might need to call the same action again for it to add the duration.

If you schedule a task as "All Day" through the plugin, and the task has been newly created, you'll need to wait for the note to save the task before using the plugin.


Entry: https://github.com/Matheus-Felipe-C/Quick-add/build/compiled.js


Changelog

August 21st, 2026

Bugfix: Format as Bullet setting was set to a string value instead of a boolean

August 19th, 2026

Refactored the application to make it more modular

Feature: Publish schedule to Jot now has access to external calendar events

January 24th, 2026

Bugifx: Fixed issue where adding a time log on the Add journal entry to today's jot would cause an exception to be thrown

January 6th, 2026

Refactored plugin to make it easier to add new features and create test cases

March 23rd, 2025

Added option to exclude tasks from specific notes when using the Publish Schedule function through a setting

January 23rd, 2025

Added option to select which tag to add from the Add Journal Entry function

Bugfix: Creating a new daily jot now adds the correct suffix

December 27th, 2024

Bugifx: fixed issue where using the schedule task as all day would cause the task's existing Start Date to be overwritten for today.

September 6th, 2024

Added an option to schedule tasks as All day tasks

July 20th, 2024

Added an option to create a new note from the Insert content inside a note user prompt.

July 17th, 2024

Bugfix: Fixed error handling that appeared when added text didn't inform a formatting option

July 10th, 2024

Bugfix: Fixed bug on Insert time now function that wouldn't bold text

Added more user-friendly error handling

July 6th, 2024

Added buttons to redirect to edited files in Insert content inside a note and Add journal entry to today's jot functions

December 28th, 2023

Bugfix: Insert time now now goes back to the original formatting after insertion, instead of keeping the cursor bold

October 5th, 2023

Bugfix: Function Publish schedule to jot button will now appear if note hasn't been created and if the note doesn't have content inside it

September 28th, 2023}

Now the Publish schedule to jotfunction caller only appears if there is no corresponding heading

September 17th, 2023

Hotfix: fixed error that caused the plugin to not work

September 14th, 2023

Calling the Publish schedule to Jot function will now get the tag from the jot it's called from

You can now change the format of the agenda to bullet points, by changing the value of the formatAsBullet constant to true

September 1st, 2023

Features:

New function Publish schedule to Jot (use in Jots mode): Publishes all tasks schedule to today in the daily jot
P.S. - It will only get tasks schedule today that are still incomplete. It won't get overdue tasks from before today, nor completed tasks for today

Bug fixes:

Fixed bug where bullet points wouldn't be added using Insert content inside a note and Add journal entry to today's jot

August 31st, 2023

Bug fixes:

Fixed bug when a daily jot was created, it would throw ReferenceError: day is not defined

Fixed bug where created daily jots would get a wrong suffix

August 17th, 2023

Features:

New function Insert time now: Inserts the current time to the note, similar to {now}, but with a style similar to Logseq and Roam Research

Added specifications to the instructions session

Bug fixes:

Now adding multi-lined tasks will return an error

Calling Add journal entry to today's jot before today's jot was created will automatically create it for you

August 5th, 2023

Published the first version to the public


linkCode block

(() => {
// lib/constants.js
var CONSTANTS = {
formatAsBullet: false,
// Change to "true" if you want to format your agenda as bullet points
defaultJotTag: "daily-jots"
};
 
// lib/helpers.js
function calculateCurrentTime(date = /* @__PURE__ */ new Date()) {
const d = new Date(date.getTime());
let minutes = d.getMinutes();
if (minutes < 10) minutes = "0" + minutes.toString();
const logTime = `${d.getHours()}:${minutes}`;
return logTime;
}
function getOrdinalSuffix(day) {
if (day >= 11 && day <= 13) return "th";
switch (day % 10) {
case 1:
return "st";
case 2:
return "nd";
case 3:
return "rd";
default:
return "th";
}
}
function buildDailyJotTitle(date = /* @__PURE__ */ new Date()) {
const dt = new Date(date.getTime());
const options = { month: "long", day: "numeric", year: "numeric" };
const suffix = getOrdinalSuffix(dt.getDate());
let today = dt.toLocaleDateString("en", options);
today = today.split(",");
today[0] += suffix;
today = today.join();
return today;
}
function getTasksDueTodayFromList(taskList, notesToRemove, dateFormat = { month: "long", day: "numeric", year: "numeric" }, todayDate = /* @__PURE__ */ new Date()) {
const todayStr = todayDate.toLocaleDateString(dateFormat);
let tasksDueToday = taskList.filter((task) => {
const startDate = new Date(task.startAt * 1e3).toLocaleDateString(dateFormat);
if (todayStr !== startDate || task.noteUUID && notesToRemove.includes(task.noteUUID)) {
return false;
}
return task;
});
tasksDueToday = tasksDueToday.map((task) => ({
content: task.content,
startTime: task.startAt
}));
return tasksDueToday;
}
 
// lib/operations/jotOperations.js
async function getOrCreateDailyJot(app, tag) {
const todayTitle = buildDailyJotTitle();
let dailyJot = await app.findNote({ name: todayTitle, tags: [tag] });
if (!dailyJot) {
const uuid = await app.createNote(todayTitle, [tag]);
dailyJot = await app.findNote({ uuid });
}
return dailyJot;
}
 
// lib/operations/noteOperations.js
async function insertContent(app, text, textFormat, noteUUID) {
const note = await app.notes.find(noteUUID);
if (textFormat === "bullet") text = `- ${text}`;
if (textFormat === "task") {
await note.insertTask({ content: text });
} else {
await note.insertContent(text);
}
}
async function createNewNotePrompt(app) {
const [noteName, noteTags] = await app.prompt("Add information about the note below", {
inputs: [
{ label: "Note Name", type: "text" },
{ label: "Add tags (optional, max of 10)", type: "tags", limit: 10 }
]
});
if (!noteName) throw new Error("Note name cannot be empty");
const noteTagArray = noteTags ? noteTags.split(",") : [];
const noteUUID = await app.createNote(noteName, noteTagArray);
if (!noteUUID) throw new Error("Note could not be created");
return await app.findNote({ uuid: noteUUID });
}
 
// lib/actions/appActions.js
var AppActions = {
/**
* Opens a prompt to add content inside the note.
* Calls a the function `_insertContent` to properly insert the content.
* @param {any} app
* @returns {void}
*/
async insertContentPrompt(app) {
const noteHandles = await app.filterNotes();
const result = await app.prompt("Insert content inside a note", {
inputs: [
{ label: "Text to add", type: "text" },
{
label: "Format as",
type: "select",
options: [
{ label: "Plain text", value: "plain" },
{ label: "Bullet point", value: "bullet" },
{ label: "Task", value: "task" }
]
},
{ label: "Select a note", type: "note", options: noteHandles },
{ label: "Create new note?", type: "checkbox" }
]
});
let [text, textFormat, noteResult, createNewNote] = result;
if (!text) throw new Error("Text field cannot be empty");
if (!noteResult && !createNewNote) throw new Error("Select a note or choose to create a new one");
if (createNewNote) noteResult = await createNewNotePrompt(app);
await insertContent(app, text, textFormat, noteResult.uuid);
const actionIndex = await app.alert("Content added successfully", {
actions: [{ icon: "search", label: "See changes in note", value: 2 }]
});
if (actionIndex == 2) await app.navigate(`https://www.amplenote.com/notes/${noteResult.uuid}`);
},
/**
* Adds a journal entry to today's jot.
* If no jot was created yet, calls the function `_createDailyJot.`
* @param {*} app
* @returns {void}
*/
// actions/appActions.js
async addJournalEntry(app) {
const result = await app.prompt("Add journal entry to today's jot", {
inputs: [
{ label: "Text to add", type: "text" },
{ label: "Add current time before the text", type: "checkbox" },
{ label: "Select the tags to add the new note in (default: daily-jots)", type: "tags", limit: 1 }
]
});
let [text, timeStampCheckbox, selectedTag] = result;
if (!text) throw new Error("Text field cannot be empty");
const finalTag = selectedTag ? selectedTag.trim() : CONSTANTS.defaultJotTag;
const dailyJot = await getOrCreateDailyJot(app, finalTag);
const jotUUID = dailyJot?.uuid || dailyJot;
const currentTime = await calculateCurrentTime();
const loggedText = timeStampCheckbox ? `**${currentTime}** ${text}` : text;
await insertContent(app, loggedText, "bullet", jotUUID);
const actionIndex = await app.alert("Journal entry added!", {
actions: [
{ icon: "search", label: "See changes", value: 2 }
]
});
if (actionIndex === 2) {
await app.navigate(`https://www.amplenote.com/notes/${jotUUID}`);
}
}
};
 
// lib/operations/scheduleOperations.js
async function getTasksDueToday(app, noteUUID) {
const setting = app.settings["Removed Notes"];
const taskList = await app.getNoteTasks({ uuid: noteUUID });
const notesToRemove = setting ? setting.split(";") : [];
const dateFormat = { month: "long", day: "numeric", year: "numeric" };
return getTasksDueTodayFromList(taskList, notesToRemove, dateFormat, /* @__PURE__ */ new Date());
}
async function publishSchedule(app, noteUUID) {
const noteHandles = await app.filterNotes({ group: "taskLists" });
const taskArray = await Promise.all(noteHandles.map((n) => getTasksDueToday(app, n.uuid)));
const flatTasks = taskArray.flat().filter(Boolean);
if (flatTasks.length === 0) {
await insertContent(app, "# Agenda\n\nNo tasks due today.", null, noteUUID);
return;
}
flatTasks.sort((a, b) => (a.startTime || a.startAt || 0) - (b.startTime || b.startAt || 0));
const todayTasks = flatTasks.map((task) => {
const rawTimestamp = task.startTime ?? task.startAt;
const timeFormatted = rawTimestamp ? new Date(rawTimestamp * 1e3).toLocaleTimeString("en-US", {
hour: "numeric",
minute: "2-digit"
}) : "All Day";
const textContent = task.content || task.name || task.text || "";
return {
...task,
timeFormatted,
textContent
};
});
const format = CONSTANTS.formatAsBullet ? "bullet" : "task";
for (const task of todayTasks.reverse()) {
const text = `**${task.timeFormatted}** ${task.textContent}`;
await insertContent(app, text, format, noteUUID);
}
const externalCalendarEvents = await app.getExternalCalendarEvents({ days: 1 });
for (const event of externalCalendarEvents) {
const start = new Date(event.start);
const formattedStart = start.toLocaleTimeString("en-US", {
hour: "2-digit",
minute: "2-digit",
hour12: true
});
const text = `**${formattedStart}** ${event.title} (External calendar)`;
await insertContent(app, text, format, noteUUID);
}
await insertContent(app, "# Agenda\n", null, noteUUID);
}
 
// lib/actions/dailyJotActions.js
var dailyJotActions = {
async publishScheduleToJot(app, noteHandle) {
let note = await app.findNote({ name: noteHandle.name, tags: noteHandle.tags });
if (!note) {
const uuid = await app.createNote(noteHandle.name, noteHandle.tags);
note = await app.findNote({ uuid });
}
await publishSchedule(app, note.uuid);
}
};
 
// lib/actions/insertTextActions.js
var insertTextActions = {
/**
* Has the same functionality as the default `{now}` function, but with a cleaner look
* @param {*} app
*/
async insertTimeNow(app) {
const text = calculateCurrentTime();
const replacedText = await app.context.replaceSelection(`**${text}** |&nbsp;`);
if (replacedText) return null;
else return text;
}
};
 
// lib/actions/taskActions.js
var taskActions = {
async scheduleAllDay(app, task) {
const base = task.startAt ? new Date(task.startAt * 1e3) : /* @__PURE__ */ new Date();
base.setHours(0, 0, 0, 0);
const startTime = base.getTime();
const duration = new Date(startTime + 1440 * 60 * 1e3);
await app.updateTask(task.uuid, { startAt: startTime / 1e3 });
const newTask = await app.getTask(task.uuid);
await app.updateTask(newTask.uuid, { endAt: duration.getTime() / 1e3 });
}
};
 
// lib/plugin.js
var wrapError = (fn) => async (...args) => {
try {
return await fn(...args);
} catch (err) {
console.error(err);
args[0]?.alert?.(err.message || err);
}
};
var plugin = {
constants: CONSTANTS,
appOption: {
"Insert content inside a note": wrapError((app) => AppActions.insertContentPrompt(app)),
"Add journal entry to today's jot": wrapError((app) => AppActions.addJournalEntry(app))
},
insertText: {
"Insert time now": wrapError((app) => insertTextActions.insertTimeNow(app))
},
dailyJotOption: {
"Publish schedule to Jot": wrapError((app, noteHandle) => dailyJotActions.publishScheduleToJot(app, noteHandle))
},
taskOption: {
"Schedule task as All Day": wrapError((app, task) => taskActions.scheduleAllDay(app, task))
}
};
var plugin_default = plugin;
return plugin;
})()