Skip to content

Latest commit

 

History

History
60 lines (40 loc) · 2.22 KB

TemplateUsage.md

File metadata and controls

60 lines (40 loc) · 2.22 KB

Template Usage

This documentation is for beginners.

If you want to customize your own template, see template doc. Post an issue if you need help.

You can find templates under the Workspace Tab/Window->Edit: image

Add a template

Click the Edit Templates to open the editor. image

Create a blank template, or from a note. Here are example templates for the test:

Copy The Name & template text to a new template and save it!

Template Name must include one of these keywords:

Custom Templates

These templates can have different names. The keyword must be incluede in the template name.

  • Text: indicate it's a normal template
  • Note: indicate it's a note template. Must select notes before inserting
  • Item: indicate it's an item template. Must select items before inserting

System Templates

Only the template with specific name will be called.

  • QuickInsert: Called when inserting a note link to main note.
  • QuickBackLink: Called when inserting a note link to main note. The template will be inserted to the end of the sub-note and point to the main note by default.
  • QuickImport: Called when importing a sub-note to main note.
  • QuickNoteV2: Called when creating a note from an annotation.

    QuickNote is deprecated since v0.6.25

  • ExportMDFileName: Called when exporting notes to markdown in batch/linked notes to markdown mode. The rendered template will be file name.

Template Examples

Welcome to share & contribute your template! See Templates From Community for more templates.

[Note] with meta-data

<p><span style="background-color: #ffd40080">Note: ${link}</span></p>
${topItem?`<p>Title: ${topItem.getField('title')}</p>
<p>Author: ${topItem.getField('firstCreator')}</p>
<p>Date: ${topItem.getField('date')}</p>`:''}

[Item] meta-data

<h2>Item Meta Data:</h2>
<p>Title: ${topItem.getField('title')}</p>
<p>Author: ${topItem.getField('firstCreator')}</p>
<p>Date: ${topItem.getField('date')}</p>