You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when using Quick Add to clip content, users have three options:
Add to Daily note
Add to Existing Note
Create new note
Desired Behavior:
Add a fourth option: 4. Create new note and add link in daily note
This new option would:
Create a new note with the clipped content
Automatically add a link to this newly created note in the current daily note
Use Case:
This feature would streamline the workflow for users who want to create separate notes for clipped content and maintain a record of when they clipped that content in their daily notes through backlinks. It combines the benefits of creating a new note with the organizational advantage of linking it to a daily note.
The text was updated successfully, but these errors were encountered:
I did this to the template in the extension by adding a property called daily_note_date with the value [[{{date|date:YYYY-MM-DD}}]]. It automagically shows up in the linked mentions at the bottom of my daily note.
I wrote a templater script to take some content and add it to today’s daily:
// clipToDailyNote.js/** * Finds the daily note for today * @param {import("obsidian").TFile} tp - The templater object * @returns {Promise<import("obsidian").TFile>} - The daily note for today */constfindTodaysFile=async(tp)=>{constdateString=tp.date.now("YYYY-MM-DD ddd");constfileName=`journals/days/${dateString}.md`;constfileExists=awaittp.file.exists(fileName);if(fileExists){returntp.file.find_tfile(fileName);}};/** * Adds content to a tfile * @param {TFile} file - The tfile to add content to * @param {string} content - The content to add to the tfile */constaddContentToTFile=async(file,content)=>{file.vault.append(file,content);};/** * Adds content to the daily note for today * @param {import("obsidian").TFile} tp - The templater object * @param {string} content - The content to add to the daily note */constclipToDailyNote=async(tp,content)=>{consttFile=awaitfindTodaysFile(tp);if(tFile){addContentToTFile(tFile,content);}};module.exports=clipToDailyNote;
Setting up Templater in obsidian settings:
Enable Trigger Templater on new file creation
Set up User script functions
You should be able to see your exported clipToDailyNote function above under Detected N User Script(s)
Then use it in your web-clipper template’s Note content:
// clips into your daily:
// - **15:31** [[Cool article on the web]]
<%*
await tp.user.clipToDailyNote(tp, "\n- **" + tp.date.now("HH:mm") + "** [[" + tp.file.title + "]]")
_%>
{{content}}
Current Behavior:
Currently, when using Quick Add to clip content, users have three options:
Add to Daily note
Add to Existing Note
Create new note
Desired Behavior:
Add a fourth option: 4. Create new note and add link in daily note
This new option would:
Create a new note with the clipped content
Automatically add a link to this newly created note in the current daily note
Use Case:
This feature would streamline the workflow for users who want to create separate notes for clipped content and maintain a record of when they clipped that content in their daily notes through backlinks. It combines the benefits of creating a new note with the organizational advantage of linking it to a daily note.
The text was updated successfully, but these errors were encountered: