The Templates & Extensions window is where you create and edit templates and keep your library tidy. You can also turn text you’ve already written into a template without opening that window.
Opening Templates & Extensions
Open it in any of these ways:
- Choose Tools > Templates & Extensions… (the Tools menu also has Insert Template…, Template Library, Save Selection as Template…, Run Extension Command… and Public Gallery…)
- Click Templates & Extensions… at the bottom of a template picker — the editor’s Insert template picker, or the one that opens next to a mind map node or outline row
- Click Templates & Extensions…, the Template icon beside the title of the Template Library pane
It opens in its own window. If it’s already open, it comes to the front. Choose Templates at the top of the window to work with templates; Extensions is where you manage extensions.
The toolbar above the template list has icon buttons. Rest the pointer on a button to see its name:
| Button | What it does |
|---|---|
| New template | Starts a new template (Cmd+N, or Ctrl+N on Windows and Linux) |
| Duplicate | Saves a copy of the selected template |
| Delete | Moves the selected template to the Trash |
| Import | Adds templates from .md or .zip files |
| Export all | Saves your templates to a file |
More actions (⋮) | Publish to gallery and Publish to team |
| Gallery | Opens the public gallery |
You can also right-click a template in the list for Duplicate, Publish to Gallery…, Publish to Team, Export Template… and Delete….
Creating and Editing a Template
- Click New template. A draft named Untitled template appears.
- Enter a Name, and if you like a Description and a Trigger — see Template Settings.
- Write the template’s Markdown in Body. Type a placeholder such as
{{title}}, and a row for it appears in Fields. Click the ? button beside the body for a syntax cheat sheet (see Syntax Help). - In Fields, set each field’s Type, Label, Default and, for a choice field, its Choices.
- Check the result in Preview, which shows each field with its default value or its name.
- Click Save, or press
Cmd+S(Ctrl+Son Windows and Linux).
To edit a template, select it in the list, make your changes and save them the same way. Nothing is saved until you click Save. While a template has Unsaved changes, Revert throws them away and restores the last saved version. If you select another template, start a new one, close the window or quit MarkNode with unsaved changes, MarkNode asks whether to save them first, with Save, Don’t Save (Don’t save on Windows) and Cancel. Cancel keeps you on the template, and when you were quitting it also stops MarkNode from quitting. Save proceeds only if the save worked.
A template marked with a warning sign in the list has a settings header that can’t be read. It still works, and its body is intact. When you save it, MarkNode rebuilds the header from the fields in the window, after asking you to confirm.
Renaming, Duplicating and Deleting
- To rename a template, change its Name and click Save. A name can’t contain
/ \ : * ? " < > |, and two templates can’t share a name, even with different capitals. - Duplicate saves a copy of the selected template with
(2)added to its name, or the next free number. - Delete asks you to confirm — the message names the template and says it will be moved to the Trash (the Recycle Bin on Windows). Choose Delete and the template leaves your library, and the next template is selected. The template’s file stays in the Trash, so you can recover it from there if you change your mind. Cancel leaves everything as it was.
Saving Text as a Template
You don’t have to start in the window. To turn something you’ve already written into a template:
- Selected text — select it in the editor, then choose Save Selection as Template… from the editor’s context menu, or Tools > Save Selection as Template…
- A whole section — right-click a node in the mind map or a row in the outline and choose Save Branch as Template…. The template gets the node’s heading, everything under it and all of its sub-sections.
Enter a name for the new template; for a branch, the node’s heading is suggested. If a template with that name already exists, you can replace it or choose another name. The text is saved exactly as written, and any {{ in it is saved as literal text rather than a placeholder. When the template is saved, a notification offers Open in Templates & Extensions, where you can add placeholders and fields.
Saving a template never changes your document.
Templates From Extensions
Templates added by an extension are listed under From and the extension’s name. They can’t be edited or deleted where they are. To change one, click Duplicate to edit: the copy goes into your own templates, where you can edit it.
Sharing Templates as Files
Templates are plain Markdown files, so they are easy to share with colleagues or move to another computer.
Exporting
Click Export all to export your whole personal library. To export only some templates, tick their checkboxes in the list first; the button then shows how many are ticked. One template is exported as a .md file, and several as a .zip file with one .md file per template. When the export is done, a notification offers Open File and Show in Folder.
Importing
Click Import and pick one or more .md or .zip files. When an imported template has the same name as one you already have, MarkNode asks what to do:
- Replace — overwrite your template with the imported one
- Keep both — keep yours and save the imported one with
(2)added to its name - Skip — leave yours and ignore the imported one
Tick Apply to all remaining to give the same answer for every other name conflict in the import. Closing the dialog stops the import; templates already imported are kept.
When the import finishes, a notification shows how many templates were imported, replaced and skipped, and why any were skipped — for example, a file that isn’t Markdown, a name that isn’t valid, or a template larger than 1 MiB.
Your Team’s Templates
When you have a seat in a team library, the window lists Personal templates first and Team templates below them. To share a personal template with your team, choose More actions (⋮) > Publish to Team, or right-click it. To keep your own copy of a team template, select it and click Duplicate to my templates. See Team Library.
To share templates with everyone who uses MarkNode, choose More actions (⋮) > Publish to gallery. See Public Gallery.