Skip to content

Instantly share code, notes, and snippets.

View racng's full-sized avatar

Rachel Ng racng

View GitHub Profile
@racng
racng / callout.js
Last active January 19, 2023 02:39
Obsidian templater template that would format text selection into a callout quote block using Obsidian callout syntax.
<%*
//get selection
noteContent = tp.file.selection();
//get array of lines
lines = noteContent.split('\n')
//make a new string with > prepended to each line
let newContent = "";
lines.forEach(l => {
newContent += '> ' + l + "\n";
})