zotero-better-notes/TemplateUsage.md

43 lines
1.9 KiB
Markdown

# How to Use Templates
This documentation is for beginners.
If you want to customize your own template, see [How to Write Your Own Template](./TemplateDoc.md). Post an issue if you need help.
You can find templates under the Workspace Tab/Window->Edit:
![image](https://user-images.githubusercontent.com/33902321/169189492-ab27b5ef-d6b2-4e4b-9035-2c11a91d53a1.png)
## Add a template
Click the _Edit Templates_ to open the editor.
![image](https://user-images.githubusercontent.com/33902321/169189605-e450702c-2336-463f-b157-600a198d987c.png)
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
- 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.
- QuickNoteV3: 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.
- ExportMDFileHeader: Called when exporting notes to markdown in batch/linked notes to markdown mode. The rendered template will be YAML header.
## Template Examples
Welcome to share & contribute your template! See [Templates From Community](https://github.com/windingwind/zotero-better-notes/discussions/categories/note-templates) for more templates.