Template Library Pane

The Template Library pane lists your templates in the left sidebar, so you can drag one exactly where you want it — into the editor’s text, onto a mind map node or onto an outline row — without opening a menu. You can also insert from it with the keyboard.

Opening the Pane

Open the pane in any of these ways:

  • Click the Template Library icon in the navbar, just below Recent files. Click it again to hide the sidebar.
  • Choose Tools > Template Library.
  • Press Cmd+Shift+T on macOS or Ctrl+Shift+T on Windows and Linux.

When the pane is already open, the menu item and the shortcut move the cursor to its search box. MarkNode remembers the open sidebar view, so if you quit with the Template Library open, it is open again next time.

The Templates & Extensions… button — the Template icon beside the pane’s title, the same icon as on the left rail — opens the Templates & Extensions window, where you create and edit templates (see Managing Templates). Changes you make there show up in the pane straight away, and your search text is kept.

Finding a Template

The pane lists your own templates under Personal, then your team’s templates under Team if you have a seat in a team library, then each extension’s templates under From and the extension’s name. Each row shows the template’s name, its description and, if it has one, its trigger.

Type in the search box to filter the list: it matches the letters you type against each template’s name, trigger and description, best matches first, just like the editor’s template picker. Press Down in the search box to move to the first template.

Templates that come with an extension are grouped under From followed by the extension’s name. To edit one, choose Duplicate to edit to make your own copy. See Extension Templates and Styles.

Rest the pointer on a row, or move to it with the keyboard, to see a preview of the template beside the list. The preview shows the template rendered as Markdown, with each field showing its default value or its name, and the headings at the levels the template was written with — they are re-levelled only once you choose where to insert it. Press Escape to close the preview.

A template from an extension can’t be edited where it is. Click Duplicate to edit on its row to copy it into your own templates, then edit the copy.

When your library is empty, the pane says No templates in your library and offers a Templates & Extensions… button to create one.

Inserting From the Keyboard

Move through the list with Up and Down, or jump to the first or last row with Home and End. Press Enter to insert the highlighted template at the editor’s cursor, replacing any selected text. Double-clicking a row does the same. The template is inserted exactly as from the editor’s toolbar picker — a template with headings first asks where it should go (the Where step), then you fill in any fields, and one Undo removes it — and the cursor goes back to the editor. See Choosing Where It Goes.

There needs to be an editor to insert into:

  • In preview-only mode, the pane shows Templates can’t be inserted while the editor is hidden. Click Show editor to bring the editor back.
  • In a read-only document, or with no document open, nothing is inserted and MarkNode tells you why.

Dragging a Template

Drag a row out of the pane, and the template’s name follows the pointer. Wherever the template can go, a cue shows exactly where it will land; release the pointer to insert it there. To cancel, press Escape, or release the pointer anywhere that shows no cue — for example, back over the pane.

Into the Editor

A drop caret in the text shows where the template will go, and follows the pointer. When you drop, MarkNode treats the drop point as if you had placed the cursor there and used the toolbar picker. A template without headings is inserted at the drop point. A template with headings asks where it should go (the Where step): the drop point picks the section, and the template goes at the end of that section or after it, with its headings re-levelled to match. You then fill in its fields in the text or in the form. The Where step is not asked for drops onto the mind map or the outline, because the node you drop on already decides the position.

A drop never replaces the selected text, and {{selection}} is left empty.

In a read-only document, the pointer shows that a drop isn’t allowed and there is no drop caret.

Onto the Mind Map

Hold the template over a node, and a cue shows one of three places it can go, depending on where the pointer is on the node:

  • Before — a line along the node’s leading edge: the template goes in as a sibling just before the node
  • After — a line along the node’s trailing edge: a sibling just after the node
  • Child — a box around the node: inside the node, after its children

The before and after zones lie along the direction the node’s siblings are laid out in. In a map whose branches grow left and right, siblings are stacked vertically, so the upper part of a node means before, the lower part means after and the middle means child. In a map whose branches grow up and down, the left part means before and the right part means after. On the left-hand side of a two-sided map, before and after follow what you see on screen.

The top-level node only shows the child cue.

When you drop, the template is inserted just as with Insert Template Before…, Insert Template After… or Insert Template as Child… from the node’s context menu, but without the template picker, since you’ve already chosen the template. If the template has fields, the form for filling them in opens next to the node. See Inserting Templates.

Onto the Outline

The outline uses the same zones as when you drag a row to move it:

  • A row with no children: the upper half means before and the lower half means after.
  • An expanded row with children: the top quarter means before, and the rest means inside, as a child.
  • A collapsed row with children: the top quarter means before, the middle half means inside and the bottom quarter means after.

The top-level row is the exception: wherever you drop on it, the template goes inside it, as a child.

To add a template as the child of another row that has no children yet, drop it on that node in the mind map, or use Insert Template as Child… from the row’s context menu.

A drop gives the same result as the same drop in the mind map, and one Undo removes it from the mind map, the outline and the editor alike.