- Added slash commands for inserting today's, yesterday's, and tomorrow's dates. - Introduced new admonition commands for notes and warnings. - Implemented a table command for quick table insertion. - Enhanced the `insertAtCursor` function to support a cursor placeholder option. - Updated `getSelection` to return the selected text along with cursor positions. - Added a new widget function to display linked tasks in the editor.
962 B
962 B
#meta
A work-in-progress library of generally useful templates for rendering queries.
-- Renders a page object as a linked list item
templates.pageItem = template.new([==[
* [[${name}]]
]==])
-- Renders a page object as a linked list item with full path
templates.fullPageItem = template.new([==[
* [[${name}|${name}]]
]==])
-- Renders a task object as a togglable task
templates.taskItem = template.new([==[
* [${state}] [[${ref}]] ${name}
]==])
-- Renders an item object
templates.itemItem = template.new([==[
* ${name}
]==])
Examples
template.pageItem:
${template.each(queryfrom index.tag "page" limit 3, templates.pageItem)}
template.taskItem:
- Task 1
- Task 2
${template.each(query, templates.taskItem)}
template.itemItem:
- Item 1
- Item 2