Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
docs(sort): restructure Sorting Notes around levels, groups and pinning
Elian Doran41a12e79f75a
diff --git a/apps/server/src/assets/help/help_content.json b/apps/server/src/assets/help/help_content.jsonindex 94f5edd57d..a7143985bb 100644--- a/apps/server/src/assets/help/help_content.json+++ b/apps/server/src/assets/help/help_content.json@@ -40,7 +40,7 @@"_help_oPVyFC7WL2Lp": "<p>This page explains how to manipulate the note tree in TriliumNext, focusing on moving notes.</p><p><img src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree_image.jpg\"></p><h2>Drag and Drop</h2><p><img src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree_drag-and-drop.gif\" alt=\"Drag and drop example\"></p><p>You can easily rearrange the note tree by dragging and dropping notes, as demonstrated in the example above.</p><h3>Importing files</h3><p>A file or archive can easily be imported into Trilium just by dragging it inside the note tree.</p><p>Note that a drag & drop always imports with <em>safe import</em> on, meaning that some features such as scripts are disabled in the upcoming notes. To bypass that, use the dedicated <a href=\"#root/_help_mHbBMPDPkVV5\">import</a> feature (right click → <em>Import into note</em>).</p><p>Unlike the import dialog, the drag & drop also has some basic auto-detection of the import. For example, dragging a .zip file with a <code>.obsidian</code> folder in it will automatically trigger a dedicated <a class=\"reference-link\" href=\"#root/_help_iWD7wiIuMtgV\">Obsidian</a> import.</p><h2>Keyboard Manipulation</h2><p><img src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree_move-note-with-keyboard.gif\" alt=\"Example of using keyboard keys to move a note\">Trilium offers efficient keyboard-based manipulation using the following <a href=\"#root/_help_A9Oc6YKKc65v\">shortcuts</a>:</p><ul><li><kbd>Ctrl</kbd> + <kbd>↑</kbd> and <kbd>Ctrl</kbd> +<kbd>↓</kbd>: Move the note up or down in the order.</li><li><kbd>Ctrl</kbd>+<kbd>←</kbd>: Move the note up in the hierarchy by changing its parent to the note's grandparent.</li><li><kbd>Ctrl</kbd>+<kbd>→</kbd>: Move the note down in the hierarchy by setting its parent to the note currently above it (this action is best understood through a demo or hands-on experience).</li><li><kbd>←</kbd> and <kbd>→</kbd>: Expand and collapse a sub-tree.</li></ul><h2>Context Menu</h2><p>You can also move notes using the familiar cut and paste functions available in the context menu, or with the associated keyboard <a href=\"#root/_help_A9Oc6YKKc65v\">shortcuts</a>: <code>CTRL-C</code> ( <a href=\"#root/_help_IakOLONlIfGI\">copy</a>), <kbd>Ctrl</kbd> + <kbd>X</kbd> (cut) and <kbd>Ctrl</kbd> + <kbd>V</kbd> (paste).</p><p>See <a class=\"reference-link\" href=\"#root/_help_YtSN43OrfzaA\">Note tree contextual menu</a> for more information.</p><h2>Tree Settings</h2><p>Click the tree icon in the tree toolbar to open the tree settings popup. It contains the following options:</p><ul><li><em>Hide archived notes</em>: When enabled, archived notes are not shown in the tree.</li><li><em>Automatically collapse notes</em>: When enabled, notes are collapsed after a period of inactivity to keep the tree tidy.</li><li><em>Follow active note</em>: When enabled (default), the tree automatically scrolls and expands parent nodes to keep the currently active note visible. When disabled, the tree is fully detached from navigation — only the background highlight of the active note is updated, but the tree viewport and its expanded/collapsed state are never changed by navigation. Use the crosshair button to manually jump the tree to the active note at any time.</li></ul><h2>Keyboard shortcuts</h2><p>The note tree comes with multiple keyboard shortcuts to make editing faster, consult the dedicated <a class=\"reference-link\" href=\"#root/_help_DvdZhoQZY9Yd\">Keyboard shortcuts</a> section.</p>","_help_YtSN43OrfzaA": "<figure class=\"image image-style-align-right\"><img style=\"aspect-ratio:269/608;\" src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree/1_Note%20tree%20contextual%20menu_image.png\" width=\"269\" height=\"608\"></figure><p>The <em>note tree menu</em> can be accessed by right-clicking in the <a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a>.</p><h2>Interaction</h2><p>The contextual menu can operate:</p><ul><li>On a single note, by right clicking it in the note tree.</li><li>On multiple notes, by selecting them first. See <a class=\"reference-link\" href=\"#root/_help_yTjUdsOi4CIE\">Multiple selection</a> on how to do so.<ul><li>When right clicking, do note that usually the note being right clicked is also included in the affected notes, regardless of whether it was selected or not.</li></ul></li></ul><h2>Available options</h2><aside class=\"admonition note\"><p>When multiple notes are selected, only a subset of notes will be active. The ones that do support multiple notes will mention this in the list below.</p></aside><p>The most frequent actions stand side by side at the top of the menu, each as an icon over its name. Use <kbd>←</kbd> and <kbd>→</kbd>, or <kbd>↑</kbd> and <kbd>↓</kbd>, to move between them.</p><ul><li><strong>Cut</strong><ul><li>Will place the given notes in clipboard.</li><li>Use one of the two paste functions (or the keyboard shortcuts) to move them to the desired location.</li></ul></li><li><strong>Clone</strong><ul><li>Will place the given notes in clipboard.</li><li>Use one of the two paste functions (or the keyboard shortcuts) to copy them to the desired location.</li><li>Note that the copy function here works according to the <a class=\"reference-link\" href=\"#root/_help_IakOLONlIfGI\">Cloning Notes</a> functionality (i.e. the note itself will be present in two locations at once, and editing it in one place will edit it everywhere).</li><li>To simply create a duplicate note that can be modified independently, look for <em>Duplicate</em>.</li></ul></li><li><strong>Paste into</strong><ul><li>Pastes the notes in clipboard as child notes of the right-clicked one.</li><li>Shown only after notes have been cut or cloned.</li></ul></li><li><strong>Paste after</strong><ul><li>Pastes the notes in clipboard underneath the right-clicked one.</li><li>Shown only after notes have been cut or cloned.</li></ul></li><li><strong>Delete…</strong><ul><li>Will delete the given notes, asking for confirmation first.</li><li>In the dialog, the following options can be configured:<ul><li><em>Delete also all clones</em> to ensure that the note will be deleted everywhere if it has been placed into multiple locations (see <a class=\"reference-link\" href=\"#root/_help_IakOLONlIfGI\">Cloning Notes</a>).</li><li><em>Erase notes permanently</em> will ensure that the note cannot be recovered from <a class=\"reference-link\" href=\"#root/_help_r5JGHN99bVKn\">Recent Changes</a>.</li></ul></li></ul></li></ul><p>The rest of the menu lists its options one per row:</p><ul><li><strong>Open note</strong><ul><li>Clicking it opens the note in a new <a href=\"#root/_help_3seOhtN8uLIY\">tab</a>.</li><li>Hovering it or clicking its arrow opens a submenu with the places the note can be opened in: <em>Open in a new tab</em>, <em>Open in a new split</em> (to the right of the note, within the current tab) and <em>Open in a new window</em>.</li></ul></li><li><strong>Quick edit</strong><ul><li>Opens the note in <a class=\"reference-link\" href=\"#root/_help_ZjLYv08Rp3qC\">Quick edit</a>, over the current one.</li></ul></li><li><strong>Hoist note</strong><ul><li>Will focus the note tree on this note. See <a class=\"reference-link\" href=\"#root/_help_OR8WJ7Iz9K4U\">Note Hoisting</a> for more information.</li></ul></li><li><strong>Insert note after</strong><ul><li>Allows easy creation of a note with a specified <a href=\"#root/_help_KSZ04uQ2D1St\">note type</a>.</li><li>The <em>Code</em> submenu starts with the scripting notes, each a code note set up for its role: <em>Custom CSS</em> (with <code>#appCss</code>), <em>Widget</em> (with <code>#widget</code> and a starting skeleton) and <em>Backend script</em>. The enabled code languages follow.</li><li><a class=\"reference-link\" href=\"#root/_help_GTwFsgaA0lCt\">Collections</a> are grouped in the <em>Collection</em> submenu. The note types created less often, the <a class=\"reference-link\" href=\"#root/_help_B2ORr7OVEZtc\">Snippets</a> and the AI quick action are in the <em>More</em> submenu.</li><li><a class=\"reference-link\" href=\"#root/_help_KC1HB96bqqHX\">Templates</a> will also be present (if any) at the end of the list.</li><li>To find an entry quickly, type into the search box at the top of the submenu, or just start typing while the submenu is open. The submenu then lists every matching entry, including those inside its own submenus (such as a code language or a collection), each with the submenu it comes from. Use <kbd>↑</kbd> and <kbd>↓</kbd> to pick a match, <kbd>Enter</kbd> to create it, and <kbd>Esc</kbd> to clear the search.</li><li>The note will be added on the same level of hierarchy as the note selected.</li></ul></li><li><strong>Insert child note</strong><ul><li>Same as <em>Insert note after</em>, but the note will be created as a child of the selected note.</li></ul></li><li><strong>Move to…</strong><ul><li>Will display a modal to specify where to move the desired notes.</li></ul></li><li><strong>Clone to…</strong><ul><li>Will display a modal to specify where to <a href=\"#root/_help_IakOLONlIfGI\">clone</a> the desired notes.</li></ul></li><li><strong>Duplicate</strong><ul><li>Creates a copy of the note and its descendants, placed right after the original.</li><li>When the note has child notes, the item also has an arrow, set apart by a divider. Hovering the item or clicking the arrow opens a submenu:<ul><li><em>Note and its children</em> does the same as clicking <em>Duplicate</em>.</li><li><em>This note only</em> copies the note with its content and attributes, but without any of its child notes. Links and relations to the original children keep pointing at them.</li></ul></li><li>This process is different from <a class=\"reference-link\" href=\"#root/_help_IakOLONlIfGI\">Cloning Notes</a> since the duplicated note can be edited independently from the original.</li><li>An alternative to this, if done regularly, would be <a class=\"reference-link\" href=\"#root/_help_KC1HB96bqqHX\">Templates</a>.</li></ul></li><li><strong>Archive/Unarchive</strong><ul><li>Marks a note as <a href=\"#root/_help_MKmLg5x6xkor\">archived</a>.</li><li>If the note is already archived, it will be unarchived instead.</li><li>Multiple notes can be selected as well. However, all the selected notes must be in the same state (archived or not), otherwise the option will be disabled.</li></ul></li><li><strong>Protect subtree/Unprotect subtree</strong><ul><li>On a note that is not protected, <em>Protect subtree</em> marks this note and all of its descendants as protected. On a protected note, the item reads <em>Unprotect subtree</em> and unprotects them instead. See <a class=\"reference-link\" href=\"#root/_help_bwg0e8ewQMak\">Protected Notes</a> for more information.</li><li>Hovering the item or clicking its arrow opens a submenu with both actions, for instance to unprotect the protected notes below a note that is not protected itself.</li></ul></li><li><strong>Import into note…</strong><ul><li>Opens the <a href=\"#root/_help_mHbBMPDPkVV5\">import</a> dialog and places the imported notes as child notes of the selected one.</li></ul></li><li><strong>Export…</strong><ul><li>Opens the <a href=\"#root/_help_mHbBMPDPkVV5\">export</a> dialog for the selected notes.</li></ul></li><li><strong>Search in subtree</strong><ul><li>Opens a full <a class=\"reference-link\" href=\"#root/_help_eIg8jdvaoNNd\">Search</a> with it preconfigured to only look into this note and its descendants (the <em>Ancestor</em> field).</li></ul></li></ul><h2>Advanced options</h2><figure class=\"image image-style-align-right\"><img style=\"aspect-ratio:231/263;\" src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree/Note%20tree%20contextual%20menu_image.png\" width=\"231\" height=\"263\"></figure><p>The advanced options menu offers some of the less frequently used actions for notes.</p><p>To access these options, first look for the <em>Advanced</em> option at the bottom of the contextual menu to reveal a sub-menu with:</p><ul><li><strong>Apply bulk actions…</strong><ul><li>Opens the <a class=\"reference-link\" href=\"#root/_help_ivYnonVFBxbQ\">Bulk Actions</a> dialog, to apply actions such as adding labels or moving notes to multiple notes at once (see <a class=\"reference-link\" href=\"#root/_help_yTjUdsOi4CIE\">Multiple selection</a>).</li></ul></li><li><strong>Edit branch prefix…</strong><ul><li>Opens a dialog to assign a name to be able to distinguish <a href=\"#root/_help_IakOLONlIfGI\">clones</a>, see <a class=\"reference-link\" href=\"#root/_help_TBwsyfadTA18\">Branch prefix</a> for more information.</li></ul></li><li><strong>Convert to attachment…</strong><ul><li>Converts the selected notes to <a class=\"reference-link\" href=\"#root/_help_0vhv7lsOLy82\">Attachments</a> of their parent notes.</li><li>This functional is most useful when dealing with image <a class=\"reference-link\" href=\"#root/_help_W8vYD3Q1zjCR\">File</a> notes that were imported from an external source or an older version of Trilium.</li></ul></li><li><strong>Expand subtree</strong><ul><li>Expands all the child notes in the <a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a>.</li></ul></li><li><strong>Collapse subtree</strong><ul><li>Collapses all the child notes in the note tree.</li></ul></li><li><strong>Sort by…</strong><ul><li>Opens a dialog to sort all the child notes of the selected note.</li><li>The sorting is done only once, there is an automatic sorting mechanism as well that can be set using <a class=\"reference-link\" href=\"#root/_help_zEY4DaJG4YT5\">Attributes</a>.</li><li>See <a class=\"reference-link\" href=\"#root/_help_aGlEvb9hyDhS\">Sorting Notes</a> for more information.</li></ul></li><li><strong>Copy note path to clipboard</strong><ul><li>Copies a URL fragment representing the full path to this branch for a note, such as <code>#root/Hb2E70L7HPuf/4sRFgMZhYFts/2IVuShedRJ3U/LJVMvKXOFv7n</code>.</li><li>The URL to manually create <a class=\"reference-link\" href=\"#root/_help_QEAPj01N5f7w\">Links</a> within notes, or for note <a class=\"reference-link\" href=\"#root/_help_wArbEsdSae6g\">Navigation</a>.</li></ul></li><li><strong>Recent changes in subtree</strong><ul><li>This will open <a class=\"reference-link\" href=\"#root/_help_r5JGHN99bVKn\">Recent Changes</a>, but filtered to only the changes related to this note or one of its descendants.</li></ul></li></ul>","_help_yTjUdsOi4CIE": "<p>In the <a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a>, it's possible to select multiple notes at one time. This won't affect the currently displayed note, but it allows to do batch operations.</p><h2>Types of multiple selection</h2><figure class=\"image image-style-align-right image_resized\" style=\"width:28.54%;\"><img style=\"aspect-ratio:335/306;\" src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree/Multiple%20selection_image.png\" width=\"335\" height=\"306\"></figure><h3>Selecting notes one by one</h3><p>To individually select each note, press the <kbd>Alt</kbd> key and click on the note to be selected.</p><p>The selected notes will be indicated via a different background color and an icon.</p><h3>Selecting notes in a sequence</h3><figure class=\"image image-style-align-right image_resized\" style=\"width:29.24%;\"><img style=\"aspect-ratio:233/205;\" src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree/Multiple%20selection_image.jpg\" width=\"233\" height=\"205\"></figure><p>When notes are in a sequence (e.g. one underneath the other), the entire selection can be made just by selecting the first and the last item instead of individually clicking all the notes.</p><p>To do so, first select the note to start the selection with. Then hold <kbd>Shift</kbd> and click on the note to end the selection with. All the notes between the start and the end note will be selected as well.</p><h2>Selected notes vs. active note</h2><p>There is a distinction between <em>selected notes</em> and the <em>active note</em>:</p><ul><li><em>Selected notes</em> are simply the notes that were selected in the multiple section process (i.e. either via <kbd>Alt</kbd> or <kbd>Shift</kbd>).</li><li>The <em>active note</em> is simply the note that whose content is being displayed to the right of the tree.<ul><li><p>Visually, it's identified in the tree by having a different background color and a subtle shadow.</p></li><li><p>The active note can also be selected case in which the icon and background will also change:</p><img class=\"image_resized\" style=\"aspect-ratio:317/223;width:35.1%;\" src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree/1_Multiple%20selection_image.png\" width=\"317\" height=\"223\"></li></ul></li></ul>",- "_help_DvdZhoQZY9Yd": "<p>The <a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a> comes with multiple keyboard shortcuts to make editing faster:</p><h2>Navigation within the tree</h2><ul><li><kbd><span>↑</span></kbd> and <kbd><span>↑</span></kbd> to navigate between notes.</li><li><kbd><span>←</span></kbd> to collapse a note with children, or <kbd><span>→</span></kbd> to expand it.</li><li><kbd><span>←</span></kbd> on a note with no children to navigate to its parent.</li></ul><h2>Opening notes</h2><ul><li><kbd>Click</kbd> to open the note in the current tab.</li><li><kbd>Ctrl</kbd>+<kbd>Click</kbd> or <kbd>Middle click</kbd> to open the note in a new tab.</li><li><kbd>Ctrl</kbd>+<kbd>Right click</kbd> to open the note in <a class=\"reference-link\" href=\"#root/_help_ZjLYv08Rp3qC\">Quick edit</a>.</li></ul><h2>Clipboard management</h2><ul><li><kbd>Ctrl</kbd>+<kbd>C</kbd> to copy one or more notes based on selection (see <a class=\"reference-link\" href=\"#root/_help_IakOLONlIfGI\">Cloning Notes</a>).</li><li><kbd>Ctrl</kbd>+<kbd>X</kbd> to cut one or more notes (for moving them).</li><li><kbd>Ctrl</kbd>+<kbd>V</kbd> to paste them somewhere (which results in a copy or move based on the shortcut used).</li></ul><h2>Moving notes</h2><ul><li><kbd>Ctrl</kbd> + <kbd><span>↑</span></kbd> , <kbd>Ctrl</kbd> + <kbd><span>↓</span></kbd> - move note up/down in the note list.</li><li><kbd>Ctrl</kbd> + <kbd><span>←</span></kbd> - move note up in the note tree.</li><li><kbd>Ctrl</kbd>+<kbd><span>→</span></kbd> - move note down in the note tree.</li><li><kbd>Del</kbd> - deletes note and optionally its subtree (asked in the dialog).</li></ul><h2>Multiple selection</h2><p>See <a class=\"reference-link\" href=\"#root/_help_yTjUdsOi4CIE\">Multiple selection</a> for more information about how selection works.</p><ul><li><kbd>Alt</kbd>+<kbd>Click</kbd> – add a single note to the current selection.</li><li><kbd>Shift</kbd>+<kbd>Click</kbd> – select a range of notes, starting from the current note (the highlighted one) to the one that is being clicked.</li><li><kbd>Shift</kbd>+<kbd><span>↑</span></kbd>, <kbd>Shift</kbd>+<kbd><span>↓</span></kbd> – multi-select not above/below.</li><li><kbd>Ctrl</kbd>+<kbd>A</kbd> – select all notes in the current level</li></ul>",+ "_help_DvdZhoQZY9Yd": "<p>The <a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a> comes with multiple keyboard shortcuts to make editing faster:</p><h2>Navigation within the tree</h2><ul><li><kbd><span>↑</span></kbd> and <kbd><span>↑</span></kbd> to navigate between notes.</li><li><kbd><span>←</span></kbd> to collapse a note with children, or <kbd><span>→</span></kbd> to expand it.</li><li><kbd><span>←</span></kbd> on a note with no children to navigate to its parent.</li></ul><h2>Opening notes</h2><ul><li><kbd>Click</kbd> to open the note in the current tab.</li><li><kbd>Ctrl</kbd>+<kbd>Click</kbd> or <kbd>Middle click</kbd> to open the note in a new tab.</li><li><kbd>Ctrl</kbd>+<kbd>Right click</kbd> to open the note in <a class=\"reference-link\" href=\"#root/_help_ZjLYv08Rp3qC\">Quick edit</a>.</li></ul><h2>Clipboard management</h2><ul><li><kbd>Ctrl</kbd>+<kbd>C</kbd> to copy one or more notes based on selection (see <a class=\"reference-link\" href=\"#root/_help_IakOLONlIfGI\">Cloning Notes</a>).</li><li><kbd>Ctrl</kbd>+<kbd>X</kbd> to cut one or more notes (for moving them).</li><li><kbd>Ctrl</kbd>+<kbd>V</kbd> to paste them somewhere (which results in a copy or move based on the shortcut used).</li></ul><h2>Moving notes</h2><ul><li><kbd>Ctrl</kbd> + <kbd><span>↑</span></kbd> , <kbd>Ctrl</kbd> + <kbd><span>↓</span></kbd> - move note up/down in the note list.</li><li><kbd>Ctrl</kbd> + <kbd><span>←</span></kbd> - move note up in the note tree.</li><li><kbd>Ctrl</kbd>+<kbd><span>→</span></kbd> - move note down in the note tree.</li><li><kbd>Del</kbd> - deletes note and optionally its subtree (asked in the dialog).</li><li><kbd>Alt</kbd>+<kbd>S</kbd> - sorts the child notes of the note (see <a class=\"reference-link\" href=\"#root/_help_aGlEvb9hyDhS\">Sorting Notes</a>).</li></ul><h2>Multiple selection</h2><p>See <a class=\"reference-link\" href=\"#root/_help_yTjUdsOi4CIE\">Multiple selection</a> for more information about how selection works.</p><ul><li><kbd>Alt</kbd>+<kbd>Click</kbd> – add a single note to the current selection.</li><li><kbd>Shift</kbd>+<kbd>Click</kbd> – select a range of notes, starting from the current note (the highlighted one) to the one that is being clicked.</li><li><kbd>Shift</kbd>+<kbd><span>↑</span></kbd>, <kbd>Shift</kbd>+<kbd><span>↓</span></kbd> – multi-select not above/below.</li><li><kbd>Ctrl</kbd>+<kbd>A</kbd> – select all notes in the current level</li></ul>","_help_wyaGBBQrl4i3": "<figure class=\"image image-style-align-right\"><img style=\"aspect-ratio:328/45;\" src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree/1_Hiding%20the%20subtree_image.png\" width=\"328\" height=\"45\"><figcaption>An example of a collection with a relatively large number of children that are hidden from the tree.</figcaption></figure><p>The tree works well when the notes are structured in a hierarchy so that the number of items stays small. When a note has a large number of notes (in the order of thousands or tens of thousands), two problems arise:</p><ul><li>Navigating between notes becomes cumbersome and the tree itself gets cluttered with a large amount of notes.</li><li>The large amount of notes can slow down the application considerably.</li></ul><p>Since v0.102.0, Trilium allows the tree to hide the child notes of particular notes. This works for both <a class=\"reference-link\" href=\"#root/_help_GTwFsgaA0lCt\">Collections</a> and normal notes.</p><h2>Interaction</h2><p>When the subtree of a note is hidden, there are a few subtle changes:</p><ul><li>To indicate that the subtree is hidden, the note will not have an expand button and it will display the number of children to the right.</li><li>It's not possible to add a new note directly from the tree.<ul><li>For <a class=\"reference-link\" href=\"#root/_help_GTwFsgaA0lCt\">Collections</a>, it's best to use the built-in mechanism to create notes (for example by creating a new point on a geo-map, or by adding a new row in a table).</li><li>For normal notes, it's still possible to create children via other means such as using the <a class=\"reference-link\" href=\"#root/_help_hrZ1D00cLbal\">Internal (reference) links</a> system.</li></ul></li><li>Notes can be dragged from outside the note, case in which they will be cloned into it.<ul><li>Instead of switching to the child notes that were copied, the parent note is highlighted instead.</li><li>A notification will indicate this behavior.</li></ul></li><li>Similarly, features such as cut/copy and then paste into the note will also work.</li></ul><h2>Spotlighting</h2><figure class=\"image image-style-align-right\"><img style=\"aspect-ratio:322/83;\" src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree/Hiding%20the%20subtree_image.png\" width=\"322\" height=\"83\"></figure><p>Even if the subtree of a note is hidden, if a child note manages to become active, it will still appear inside the tree in a special state called <em>spotlighted</em>.</p><p>During this state, the note remains under its normal hierarchy, so that its easy to tell its location. In addition, this means that:</p><ul><li>The note position is clearly visible when using the <a class=\"reference-link\" href=\"#root/_help_eIg8jdvaoNNd\">Search</a>.</li><li>The note can still be operated on from the tree, such as adding a <a class=\"reference-link\" href=\"#root/_help_TBwsyfadTA18\">Branch prefix</a> or moving it outside the collection.</li></ul><p>The note appears in italics to indicate its temporary display. When switching to another note, the spotlighted note will disappear.</p><aside class=\"admonition note\"><p>Only one note can be highlighted at the time. When working with multiple notes such as dragging them into the collection, no note will be spotlighted. This is intentional to avoid displaying a partial state of the subtree.</p></aside><h2>Working with collections</h2><p>For large collections, it can be helpful to hide their child notes for performance reasons or de-cluttering the tree.</p><p>To toggle this behavior:</p><ul><li>Open the collection and in <a class=\"reference-link\" href=\"#root/_help_CssoWBu8I7jF\">Collection Properties</a>, look for <em>Hide child notes in tree</em>.</li><li>Right click the collection note in the <a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a> and select <em>Advanced</em> → <em>Show subtree</em>.</li></ul><h2>Working with normal notes</h2><p>It's possible to hide the subtree for normal notes as well, not just collections. To do so, right click the note in the <a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a> and select <em>Advanced</em> → <em>Hide subtree.</em></p>","_help_3seOhtN8uLIY": "<figure class=\"image image-style-align-center\"><img style=\"aspect-ratio:1119/43;\" src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/UI%20Elements/Tabs_image.png\" width=\"1119\" height=\"43\"></figure><p>In Trilium, tabs allow easy switching between notes.</p><h2>Layout</h2><p>Depending on the <a class=\"reference-link\" href=\"#root/_help_x0JgW8UqGXvq\">Vertical and horizontal layout</a>:</p><ul><li>For the vertical layout, the tabs will be placed at the top but to the right of the <a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a>.</li><li>For the horizontal layout, the tabs will be placed at the top in full-width, above the <a href=\"#root/_help_oPVyFC7WL2Lp\">note tree</a>, allowing for more tabs to be comfortably displayed.</li></ul><h2>Interaction</h2><ul><li>To create a new tab, press the <span class=\"tn-icon bx bx-plus\"></span> button that is to the right of the last tab.</li><li>To close a tab, press the corresponding <span class=\"tn-icon bx bx-x\"></span> button.</li><li>For multitasking, tabs can be used alongside <a class=\"reference-link\" href=\"#root/_help_luNhaphA37EO\">Split View</a>. Each tab can have one or more notes, displayed horizontally.</li><li>Tabs can be reordered by drag-and-dropping it into a new position.</li><li>An existing tab can be displayed in a new window by dragging the tab upwards or downwards. It is not possible to combine tabs back into another window.</li></ul><h2>Keyboard interaction</h2><p>Since tabs are a commonly used feature, there are multiple keyboard shortcuts that can be used:</p><ul><li><kbd>Ctrl</kbd>+<kbd>T</kbd> to open a new tab.</li><li><kbd>Ctrl</kbd>+<kbd>W</kbd> to close the current tab.</li><li><kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>T</kbd> to reopen the last closed tab.</li><li><kbd>Ctrl</kbd>+<kbd>Tab</kbd> and <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Tab</kbd> to go to the next or previous tab.</li><li><kbd>Ctrl</kbd>+<kbd>1</kbd>, <kbd>Ctrl</kbd>+<kbd>2</kbd>, up to <kbd>Ctrl</kbd>+<kbd>9</kbd> to activate the first, second and up to ninth tab.</li><li>There is also a shortcut to go to the last tab, but it is not assigned a key by default.</li></ul><h2>Mobile</h2><figure class=\"image image-style-align-right image_resized\" style=\"width:34.12%;\"><img style=\"aspect-ratio:1242/2688;\" src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/UI%20Elements/Tabs_IMG_1767.PNG\" width=\"1242\" height=\"2688\"></figure><p>Tabs are also supported on the <a class=\"reference-link\" href=\"#root/_help_RDslemsQ6gCp\">Mobile Frontend</a>.</p><p>Since v0.102.0, the tabs are displayed by pressing the dedicated tab switcher button in the <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a>. In this view the tabs are laid out on a grid with a preview of the note content.</p><p>The context menu button at the top-right of the popup allows creating a new tab, reopening the last closed tab and closing all the tabs.</p><p><a class=\"reference-link\" href=\"#root/_help_luNhaphA37EO\">Split View</a>s are also indicated in the tab switcher, with two titles displayed in a tab.</p><aside class=\"admonition note\"><p>Versions prior to v0.102.0 also supported tabs, but they were displayed directly above the <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a>. The decision to use a more mobile-like tab switcher was taken because the original tab bar could not support many tabs at once and the new design better aligns with how mobile applications handle tabs.</p></aside>","_help_xYmIYSP6wE3F": "<h2>Position of the Launch bar</h2><p>On desktop, depending on the layout selected, the launcher bar will either be on the left side of the screen with buttons displayed vertically or at the top of the screen. See <a class=\"reference-link\" href=\"#root/_help_x0JgW8UqGXvq\">Vertical and horizontal layout</a> for more information.</p><p>On mobile, the launch bar will always be at the bottom.</p><p>If there are too many items in the launch bar to fit the screen, it will become scrollable.</p><h2>Terminology</h2><ul><li><strong>Launcher</strong>: a button that can be (or is) displayed on the launch bar.</li><li><strong>Available Launcher</strong>: a launcher that is not displayed on the launch bar, but can be added.</li><li><strong>Visible Launcher</strong>: a launcher that is currently displayed on the launch bar.</li></ul><h2>Configuring the desktop Launch bar</h2><p>There are two ways to configure the launch bar:</p><ul><li>Right click in the empty space between launchers on the launch bar and select <em>Configure Launchbar…</em></li><li>Click on the <a class=\"reference-link\" href=\"#root/_help_x3i7MxGccDuM\">Global menu</a> and select <em>Configure Launchbar</em>.</li></ul><p>This will open a new tab with the <a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a> listing the launchers.</p><p><img src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/UI%20Elements/Launch%20Bar_image.jpg\"></p><p>Expanding <em>Available Launchers</em> section will show the list of launchers that are not displayed on the launch bar. The <em>Visible Launchers</em> will show the ones that are currently displayed.</p><h2>Configuring the mobile launch bar</h2><p>The launch bar on mobile uses a different configuration from the desktop one. The reasoning is that not all desktop icons are available on mobile, and fewer icons fit on a mobile screen.</p><p>To configure the launch bar on mobile, go to <a class=\"reference-link\" href=\"#root/_help_x3i7MxGccDuM\">Global menu</a> and select <em>Configure Launchbar</em>.</p><p>The configure the mobile launch bar while on the desktop (especially useful to configure more complicated launchers such as scripts or custom widgets), go to <a class=\"reference-link\" href=\"#root/_help_x3i7MxGccDuM\">Global menu</a> → Advanced → Show Hidden Subtree and look for the <em>Mobile Launch Bar</em> section. While in the hidden subtree, it's also possible to drag launchers between the <em>Mobile Launch Bar</em> and (Desktop) <em>Launch Bar</em> sections.</p><h3>Adding/removing and reordering launchers</h3><p>To display a new launcher in the launch bar, first look for it in the <em>Available Launchers</em> section. Then right click it and select <em>Move to visible launchers</em>. It is also possible to drag and drop the item manually.</p><p>Similarly, to remove it from the launch bar, simply look for it in <em>Visible Launchers</em> then right click it and select <em>Move to available launchers</em> or use drag-and-drop.</p><p>Drag-and-drop the items in the tree in order to change their order. See <a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a> for more interaction options, including using keyboard shortcuts.</p><h2>Customizing the launcher</h2><ul><li>The icon of a launcher can be changed just like a normal note. See <a href=\"#root/_help_p9kXRFAkwN4o\">note icons</a> for more information.</li><li>The title of the launcher can also be changed.</li></ul><h3>Resetting</h3><p>Resetting allows restoring the original configuration of Trilium for the launcher bar, or for a portion of it. Simply right click a launcher (or even the entire <em>Launch Bar</em> section) and select <em>Reset</em> to bring it back to the original state.</p><h3>Creating new launchers / types of launchers</h3><p>Right click either the <em>Available launchers</em> or <em>Visible launchers</em> sections and select one of the options:</p><ol><li><p><strong>Note Launcher</strong><br>A note launcher will simply navigate to a specified note.</p><ol><li>Set the <code>target</code> promoted attribute to the note to navigate to.</li><li>Optionally, set <code>hoistedNote</code> to hoist a particular note. See <a class=\"reference-link\" href=\"#root/_help_OR8WJ7Iz9K4U\">Note Hoisting</a> for more information.</li><li>Optionally, set a <code>keyboardShortcut</code> to trigger the launcher.</li></ol></li><li><p><strong>Script Launcher</strong><br>An advanced launcher which will run a script upon pressing. See <a class=\"reference-link\" href=\"#root/_help_CdNpE2pqjmI6\">Scripting</a> for more information.</p><ol><li>Set <code>script</code> to point to the desired script to run.</li><li>Optionally, set a <code>keyboardShortcut</code> to trigger the launcher.</li></ol></li><li><p><strong>Custom Widget</strong></p><p>Allows defining a custom widget to be rendered inside the launcher. See <a class=\"reference-link\" href=\"#root/_help_SynTBQiBsdYJ\">Widget Basics</a> for more information.</p></li><li><p><strong>Spacers</strong><br>Launchers that create some distance between other launchers for better visual distinction.</p></li></ol><p>Launchers are configured via predefined <a class=\"reference-link\" href=\"#root/_help_OFXdgB2nNk1F\">Promoted Attributes</a>.</p>",@@ -70,7 +70,7 @@"_help_bwg0e8ewQMak": "<p>Trilium is designed to store a wide variety of data, including sensitive information such as personal journals, credentials, or confidential documents. To safeguard this type of content, Trilium offers the option to protect notes, which involves the following measures:</p><ul><li><strong>Encryption:</strong> Protected notes are encrypted using a key derived from your password. This ensures that without the correct password, protected notes remain indecipherable. Even if someone gains access to your Trilium <a href=\"#root/_help_wX4HbRucYSDD\">database</a>, they won't be able to read your encrypted notes.</li><li><strong>Time-limited access:</strong> To access protected notes, you must first enter your password, which decrypts the note for reading and writing. However, after a specified period of inactivity (10 minutes by default), the note is unloaded from memory, requiring you to re-enter your password to access it again.<ul><li>The session timeout is extended automatically while you're interacting with the protected note, so if you're actively editing, the session remains open. However, if you switch to an unprotected note, the session timer starts, and the session expires after 10 minutes of inactivity unless you return to the protected notes.</li></ul></li><li><strong>Protection scope:</strong> Protected notes ensure the confidentiality of their content and partially their integrity. While unauthorized users cannot read or edit protected notes, they can still delete or move them outside of the protected session.</li></ul><h2>Using Protected Notes</h2><p>By default, notes are unprotected. To protect a note, simply click on the shield icon next to the note's title, as shown here:</p><p><img src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/Notes/Protected%20Notes_protecting-note.gif\" alt=\"example animation of unlocking protected notes\"></p><h2>What is Encrypted?</h2><p>Trilium encrypts the data within protected notes but not their metadata. Specifically:</p><p><strong>Encrypted:</strong></p><ul><li>Note title</li><li>Note content</li><li>Images</li><li>File attachments</li></ul><p><strong>Not encrypted:</strong></p><ul><li>Note structure (i.e., it remains visible that there are protected notes)</li><li>Metadata, such as the last modified date</li><li><a href=\"#root/_help_zEY4DaJG4YT5\">Attributes</a></li></ul><h2>Encryption Details</h2><p>The following steps outline how encryption and decryption work in Trilium:</p><ol><li>The user enters a password.</li><li>The password is passed through the <a href=\"https://en.wikipedia.org/wiki/Scrypt\">scrypt</a> algorithm along with a \"password verification\" <a href=\"https://en.wikipedia.org/wiki/Salt_(cryptography)\">salt</a> to confirm that the password is correct.</li><li>The password is then processed again through scrypt with an \"encryption\" salt, which generates a hash.<ul><li>Scrypt is used for <a href=\"https://en.wikipedia.org/wiki/Key_stretching\">key stretching</a> to make the password harder to guess.</li></ul></li><li>The generated hash is used to decrypt the actual <em>data encryption key</em>.<ul><li>The data encryption key is encrypted using <a href=\"https://en.wikipedia.org/wiki/Advanced_Encryption_Standard\">AES-128</a> with a random <a href=\"https://en.wikipedia.org/wiki/Initialization_vector\">IV</a>.</li><li>The data encryption key is randomly generated during the <a href=\"#root/_help_wX4HbRucYSDD\">database</a> initialization and remains constant throughout the document’s lifetime. When the password is changed, only this key is re-encrypted.</li></ul></li><li>The data encryption key is then used to decrypt the actual content of the note, including its title and body.<ul><li>The encryption algorithm used is AES-128 with <a href=\"https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation\">CBC mode</a>, where a unique IV is generated for each encryption operation and stored with the cipher text.</li></ul></li></ol><h2>Sharing Protected Notes</h2><p>Protected notes cannot be shared in the same way as regular notes. Their encryption ensures that only authorized users with the correct password can access them.</p>","_help_MKmLg5x6xkor": "<p>Archived notes are notes which have <code>archived</code> <a href=\"#root/_help_zEY4DaJG4YT5\">attribute</a> - either directly or <a href=\"#root/_help_bwZpz2ajCEwO\">inherited</a>.</p><p>Such notes are then by default not shown in the autocomplete and in the full text <a href=\"#root/_help_eIg8jdvaoNNd\">search</a>.</p><p>This can be useful for notes which are no longer very useful but still valuable enough to keep around without them getting too much in the way.</p><p>You can control whether archived notes are displayed in the note tree with a setting:</p><p><img src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/Notes/Archived%20Notes_hide-archived.png\"></p>","_help_vZWERwf8U3nx": "<figure class=\"image\"><img style=\"aspect-ratio:2089/1515;\" src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/Notes/Note%20Revisions_image.png\" width=\"2089\" height=\"1515\"></figure><p>Trilium supports seamless versioning of notes by storing snapshots (\"revisions\") of notes at regular intervals.</p><p>To display the revisions, press the <a class=\"reference-link\" href=\"#root/_help_8YBEPzcpUgxw\">Note menu</a> and select <em>Note revisions…</em> (<span class=\"tn-icon bx bx-history\"></span>).</p><h2>Interaction</h2><aside class=\"admonition note\"><p>This documentation matches the redesign of the note revisions dialog on v0.103.0, older versions have a similar dialog but with some differences.</p></aside><ul><li>The full list of revisions are displayed on the left in reverse chronological order.<ul><li>The revisions are grouped by the date the revision was taken.</li><li>This list does not contain the <em>current state</em> of the note, so it is possible to have notes with no revisions/snapshots saved.</li></ul></li><li>The icon of a revision indicates the <em>source</em> of that revision (e.g. a <span class=\"tn-icon bx bx-save\"></span> icon for a manually saved revision).</li><li>Pressing the <span class=\"tn-icon bx bx-dots-horizontal-rounded\"></span> button on the top-right of the dialog displays multiple options, including:<ul><li><span class=\"tn-icon bx bx-save\"></span> Saving a new revision now.</li><li>Checking the interval and limit for this note (see below).</li><li><span class=\"tn-icon bx bx-trash\"></span> Deleting all the revisions of this note.</li></ul></li><li>For supported notes (text, code), changes are highlighted. This behavior can be toggled via the <em>Highlight changes</em> at the top of the dialog.<ul><li>The highlighted changes are relative to the <strong>current state of the note</strong>, not to the revision prior to this one.</li></ul></li><li>For any given revision, the buttons on the top-right allow operating on it:<ul><li><span class=\"tn-icon bx bx-trash\"></span> Deleting the revision.</li><li><span class=\"tn-icon bx bx-download\"></span> Downloading the revision locally.</li><li><span class=\"tn-icon bx bx-history\"></span> Restoring the revision, which replaces the current content of the note with the one from the revision. Another revision is saved containing the current content of the note.</li></ul></li></ul><h2>Named revisions</h2><p>Named revisions are a new feature of Trilium v0.103.0 which allows adding a short description of what the changes in the snapshot contain.</p><p>In the list of note revisions:</p><ul><li>The name of the revision is displayed underneath the time of the revision in the sidebar, as well as at the top of the dialog where it is displayed in full.</li><li>Clicking on the <span class=\"tn-icon bx bx-edit-alt\"></span> edit button near the name of the revision allows it to be changed.</li></ul><p>To create a named revision, either:</p><ul><li>Go to the <a class=\"reference-link\" href=\"#root/_help_8YBEPzcpUgxw\">Note menu</a>, select <em>Save named revision…</em> (<span class=\"tn-icon bx bx-purchase-tag\"></span>), enter the name of revision and confirm.</li><li>Use the corresponding <a href=\"#root/_help_A9Oc6YKKc65v\">keyboard shortcut</a> or the <a class=\"reference-link\" href=\"#root/_help_F1r9QtzQLZqm\">Jump to & command palette</a> command with the same name.</li><li>Save a revision normally, and adjust the name afterwards from the note revision list.</li></ul><h2>When revisions are saved</h2><p>Revisions are saved:</p><ul><li>Automatically at a fixed interval. This behavior can be configured (see below).</li><li>Manually, by:<ul><li>Going to the <a class=\"reference-link\" href=\"#root/_help_8YBEPzcpUgxw\">Note menu</a> and selecting <em>Save revision</em> (<span class=\"tn-icon bx bx-save\"></span>).</li><li>Using the <em>Force Save Revision</em> <a href=\"#root/_help_A9Oc6YKKc65v\">keyboard shortcut</a>.</li><li>In the <em>Note Revisions</em> dialog, pressing the <span class=\"tn-icon bx bx-dots-horizontal-rounded\"></span> button in the top-right and selecting <em>Save a revision now</em>.</li></ul></li></ul><p>Additionally, revisions can also come from somewhere else, and this is indicated via the icon of the revision:</p><ul><li><span class=\"tn-icon bx bx-code-alt\"></span> Generated externally, by <a class=\"reference-link\" href=\"#root/_help_pgxEVkzLl1OP\">ETAPI (REST API)</a>.</li><li><span class=\"tn-icon bx bx-bot\"></span> A modification created by <a class=\"reference-link\" href=\"#root/_help_GBBMSlVSOIGP\">AI</a>.</li><li><span class=\"tn-icon bx bx-history\"></span> A revision is restored, causing the existing note content to be saved as a revision to prevent potential data loss.</li></ul><h4>Snapshot interval</h4><p>Time interval of taking note snapshot is configurable in the Options → Other dialog. This provides a trade-off between more revisions and more data to store.</p><p>To turn off note versioning for a particular note (or sub-tree), add <code>disableVersioning</code> <a href=\"#root/_help_zEY4DaJG4YT5\">label</a> to the note.</p><h4>Maximum revisions</h4><p>The limit on the number of note snapshots can be configured in the Options → Other dialog. The note revision snapshot number limit refers to the maximum number of revisions that can be saved for each note. Where -1 means no limit, 0 means delete all revisions. You can set the maximum revisions for a single note through the <code>versioningLimit=X</code> label.</p><p>The note limit will not take effect immediately; it will only apply when the note is modified.</p><p>You can click the <em>Erase now</em> button under <em>Erase excess revision snapshots</em> to apply the changes immediately.</p>",- "_help_aGlEvb9hyDhS": "<h2>Manual sorting</h2><p>You can sort notes by right-clicking the parent note in the <a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a> and selecting Advanced -> Sort notes by ... This will sort existing notes, but will not automatically sort future notes added to this parent note.</p><p>The sorting dialog allows:</p><ul><li>Sorting by title, creation or modification date, or by the value of a label on the child notes.</li><li>Sorting by several such criteria in turn, each ascending or descending: the next level only decides between notes the previous ones left equal.</li><li>Ensuring folders are displayed at the top.</li><li>Natural sort, based on the sorting rules of a particular language.</li></ul><h2>Automatic/Permanent Sorting</h2><p>Child notes can be automatically sorted by attaching specific <a href=\"#root/_help_zEY4DaJG4YT5\">labels</a> to the parent note:</p><figure class=\"table\"><table><thead><tr><th>Label</th><th>Description</th></tr></thead><tbody><tr><td><code>#sorted</code></td><td><p>Keeps child notes sorted by title alphabetically.</p><p>When given a value, it will sort by other criteria instead: a comma-separated list of levels, each a label on the child notes written with <code>#</code>, or one of the properties <code>title</code>, <code>dateCreated</code>, <code>dateModified</code> and <code>folders</code>, optionally followed by <code>asc</code> or <code>desc</code>, as in a search's <code>orderBy</code>. For example <code>#sorted=\"#priority desc, #dueDate\"</code> sorts by priority, highest first, and notes of equal priority by due date. A child note without a level's label sorts after every child that has it, whichever direction the level runs in. When neither note has the label, the next level decides.</p><p>A label followed by <code>first</code> or <code>last</code> instead groups the child notes that have it before or after the rest, whatever its value. For example <code>#sorted=\"#archived last, title\"</code> keeps <a href=\"#root/_help_MKmLg5x6xkor\">archived notes</a> below the others.</p></td></tr><tr><td><code>#sortDirection</code></td><td><p>If <code>sorted</code> is applied, specifies the direction of the sort:</p><ul><li><code>ASC</code>, ascending (default)</li><li><code>DESC</code>, descending</li></ul><p>A level of <code>sorted</code> followed by its own <code>asc</code> or <code>desc</code> keeps that direction regardless, and so does a <code>first</code> or <code>last</code> group.</p></td></tr><tr><td><code>#sortFoldersFirst</code></td><td>If <code>sorted</code> is applied, folders (notes with children) will be sorted as a group at the top (at the bottom when <code>#sortDirection</code> is <code>desc</code>), and the rest will be sorted. Ignored when <code>sorted</code> places <code>folders</code> itself.</td></tr><tr><td><code>#sortNatural</code></td><td>Sort numbers naturally instead of alphabetically, so 2 comes before 10.</td></tr><tr><td><code>#sortLocale</code></td><td>The language code driving the natural sort (e.g. <code>zh-CN</code>, <code>de</code>). Only meaningful together with <code>#sortNatural</code>.</td></tr><tr><td><code>#top</code></td><td>If <code>sorted</code> is applied to the parent note, keeps given note on top in its parent.</td></tr><tr><td><code>#bottom</code></td><td>If <code>sorted</code> is applied to the parent note, keeps given note on bottom in its parent.</td></tr></tbody></table></figure><p>Sorting is done by comparing note properties or specific labels on child notes. There are four sorting levels, with the first having the highest priority. Lower priority levels are applied only if higher priority comparisons result in equality.</p><ol><li><strong>Top Label Sorting</strong>: Child notes with the <code>#top</code> label will appear at the top of the folder, unless <code>#sorted</code> places <code>#top</code> itself (see below).</li><li><strong>Bottom Label Sorting</strong>: (Introduced in Trilium 0.62) Child notes with the <code>#bottom</code> label will appear at the bottom of the folder, unless <code>#sorted</code> places <code>#bottom</code> itself.</li><li><strong>Property/Label-Based Sorting</strong>: Sorting is based on the parent note's <code>#sorted</code> label:<ul><li><strong>Default Sorting</strong>: If <code>#sorted</code> has no value, notes are sorted alphabetically.</li><li><strong>Property Sorting</strong>: If <code>#sorted</code> is set to <code>title</code>, <code>dateModified</code>, or <code>dateCreated</code>, notes are sorted based on the specified property. The <code>folders</code> property, which notes with children have, is meant for grouping, as in <code>folders first</code>, which a bare <code>folders</code> level also does since notes without children sort after those with; on its own, <code>#sorted=folders</code> still sorts by a <code>#folders</code> label.</li><li><strong>Label Sorting</strong>: If <code>#sorted</code> is set to the name of a child note's label, sorting is based on the values of this label. For example, setting <code>#sorted=#myOrder</code> on the parent note and using <code>#myOrder=001</code>, <code>#myOrder=002</code>, etc., on child notes. A single name without <code>#</code> that is not one of the properties above is also treated as a label, so <code>#sorted=myOrder</code> works the same way.</li><li><strong>Multi-Level Sorting</strong>: Several of the above can be combined, separated by commas; each level is applied only where the previous ones are equal. A label is written with <code>#</code> and a property without it. Every level can carry its own direction as a word after the name, <code>asc</code> or <code>desc</code>, otherwise it follows <code>#sortDirection</code>. For example <code>#sorted=\"#priority desc, #area, dateCreated\"</code> sorts by priority, highest first, then by area, then by creation date.</li><li><strong>Grouping</strong>: A label, or <code>folders</code>, followed by <code>first</code> or <code>last</code> puts the child notes that have it, with any value, before or after the rest, regardless of <code>#sortDirection</code>. The following levels then sort within each group. For example <code>#sorted=\"#archived last, #priority desc\"</code>. Notes with <code>#top</code> or <code>#bottom</code> stay at the top or bottom even when they belong to a group, unless <code>#sorted</code> names those labels too.</li><li><strong>Placing <code>#top</code> and <code>#bottom</code></strong>: Naming <code>#top</code> or <code>#bottom</code> in <code>#sorted</code> applies it at that position instead of before every level. For example <code>#sorted=\"#archived last, #top first, #bottom last, title\"</code> keeps archived notes below all the others, including those with <code>#bottom</code>, and <code>#top</code> and <code>#bottom</code> then apply within each of the two groups. Adding <code>folders first</code> after them, as in <code>#sorted=\"#archived last, #top first, #bottom last, folders first, title\"</code>, groups folders within each group too, so archived folders sort below the other notes. <code>#sortFoldersFirst</code> places <code>folders first</code> the same way, right after the last of <code>#top</code> and <code>#bottom</code>. Written with <code>first</code> or <code>last</code>, the labels ignore their values; to order several pinned notes by value, add a level such as <code>#top</code> or <code>#bottom desc</code> after them.</li></ul></li><li><strong>Alphabetical Sorting</strong>: Used as a last resort when other criteria result in equality.</li></ol><aside class=\"admonition warning\"><p>Since v0.107.0, a label in a multi-level <code>#sorted</code> must be written with <code>#</code>. In v0.106.0 the names were written bare, as in <code>#sorted=\"priority desc, dueDate\"</code>; such a value now reads both names as properties that do not exist and falls back to sorting by title. Add a <code>#</code> before each label name to restore it.</p></aside><p>All comparisons are made string-wise (e.g., \"1\" < \"2\" or \"2020-10-10\" < \"2021-01-15\", but also \"2\" > \"10\").</p>",+ "_help_aGlEvb9hyDhS": "<p>Trilium can sort the child notes of a note once, using the <em>Sort by…</em> dialog, or keep them sorted permanently, using the <code>#sorted</code> label. Both sort by the same criteria: the title, the creation or modification date, or the value of a label on the child notes, and both can combine several of these into sorting levels.</p><h2>Sorting once with the dialog</h2><p>To sort the children of a note once, right-click it in the <a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a> and select <em>Sort by…</em>, or select it and press <kbd>Alt</kbd>+<kbd>S</kbd>. The order is applied to the existing child notes only; notes added later are placed wherever they are created.</p><p>The dialog consists of:</p><ul><li><em>Sorting criteria</em>, a list of levels. Each level sorts by <em>Title</em>, <em>Date created</em>, <em>Date modified</em> or <em>Label</em> (followed by the name of the label), <em>Ascending</em> or <em>Descending</em>.<ul><li>To sort by more than one criterion, select <em>Add level</em>. The first level decides the order; the next level only decides between notes the previous ones left equal (see <em>Sort levels</em> below).</li><li>To change the order of the levels, use the <span class=\"tn-icon bx bx-up-arrow-alt\"></span> and <span class=\"tn-icon bx bx-down-arrow-alt\"></span> buttons. To remove a level, use the <span class=\"tn-icon bx bx-x\"></span> button.</li></ul></li><li><em>Sort folders at the top</em>, which places notes that have children of their own before the others. When the first level is descending, they are placed at the bottom instead.</li><li><em>Natural sort</em>, which compares numbers and characters by the rules of a language (see <em>How values are compared</em> below). <em>Natural sort language</em> sets the language code, for example <code>zh-CN</code> for Chinese.</li></ul><p>Notes with <code>#top</code> or <code>#bottom</code> stay at the top or bottom, as with automatic sorting (see <em>Pinning notes to the top or bottom</em> below).</p><h2>Keeping child notes sorted</h2><p>To keep the children of a note sorted, add the <code>#sorted</code> <a href=\"#root/_help_HI6GBBIduIgv\">label</a> to it. Trilium sorts its child notes again whenever a child is added or changes, and whenever the sorting labels change.</p><figure class=\"table\"><table><thead><tr><th>Label</th><th>Description</th></tr></thead><tbody><tr><td><code>#sorted</code></td><td>Keeps the child notes sorted. Without a value, they are sorted by title; with a value, by the levels it lists (see <em>Sort levels</em> below). <code>#sorted=off</code> turns sorting off.</td></tr><tr><td><code>#sortDirection</code></td><td><code>asc</code> (the default) or <code>desc</code>. The direction of every level that doesn't specify its own.</td></tr><tr><td><code>#sortFoldersFirst</code></td><td>Places notes that have children of their own before the others, or after them when <code>#sortDirection</code> is <code>desc</code>.</td></tr><tr><td><code>#sortNatural</code></td><td>Compares numbers by their value instead of character by character, so 2 comes before 10.</td></tr><tr><td><code>#sortLocale</code></td><td>The language code for <code>#sortNatural</code>, for example <code>zh-CN</code> or <code>de</code>.</td></tr><tr><td><code>#top</code></td><td>On a child note: keeps it at the top of its sorted parent.</td></tr><tr><td><code>#bottom</code></td><td>On a child note: keeps it at the bottom of its sorted parent.</td></tr></tbody></table></figure><p>The labels apply to the note that carries them and, when made <a href=\"#root/_help_bwZpz2ajCEwO\">inheritable</a>, to every note below it, so a single <code>#sorted(inheritable)</code> sorts a whole subtree. A note created from a <a href=\"#root/_help_KC1HB96bqqHX\">template</a> that has <code>#sorted</code> keeps its children sorted too. To exclude part of such a subtree, add <code>#sorted=off</code> to the note whose children must keep their manual order; to exclude everything below it as well, make that label inheritable too.</p><h2>Sort levels</h2><p>The value of <code>#sorted</code> is a comma-separated list of levels, written like the <code>orderBy</code> of a <a href=\"#root/_help_eIg8jdvaoNNd\">search</a>. Each level is one of:</p><ul><li>A label on the child notes, written with <code>#</code>, such as <code>#priority</code>.</li><li>One of the properties <code>title</code>, <code>dateCreated</code> and <code>dateModified</code>, written without <code>#</code>.</li><li><code>folders</code>, which only the notes with children of their own have (see <em>Grouping</em> below).</li></ul><p>A level can be followed by <code>asc</code> or <code>desc</code> to set its direction; otherwise it follows <code>#sortDirection</code>.</p><p>The child notes are sorted by the first level. Notes that are equal at that level are sorted by the second level, and so on. Notes equal at every level are sorted by title, in the direction of <code>#sortDirection</code>.</p><p>A child note that doesn't have a level's label is placed after every child that has it, whichever direction the level runs in. Between two notes that both lack it, the next level decides.</p><p>For example, <code>#sorted=\"#priority desc, #dueDate\"</code> on a parent with these children:</p><figure class=\"table\"><table><thead><tr><th>Child note</th><th>Labels</th></tr></thead><tbody><tr><td>Book report</td><td><code>#priority=2</code> <code>#dueDate=2026-11-01</code></td></tr><tr><td>Groceries</td><td><code>#priority=1</code></td></tr><tr><td>Taxes</td><td><code>#priority=2</code> <code>#dueDate=2026-10-25</code></td></tr><tr><td>Ideas</td><td>none</td></tr></tbody></table></figure><p>sorts them as <em>Taxes</em>, <em>Book report</em>, <em>Groceries</em>, <em>Ideas</em>. The highest priority comes first; <em>Taxes</em> and <em>Book report</em> share it, so the earlier due date decides between them. <em>Ideas</em> has no priority and goes last.</p><p>A value that is a single name without <code>#</code> is read the way older versions did: <code>title</code>, <code>dateCreated</code> or <code>dateModified</code> is a property, and any other name is a label, so <code>#sorted=myOrder</code> sorts by the <code>#myOrder</code> label of the children.</p><aside class=\"admonition warning\"><p>Since v0.107.0, a label in a <code>#sorted</code> value with more than one level, or with a direction, must be written with <code>#</code>. In v0.106.0 the names were written bare, as in <code>#sorted=\"priority desc, dueDate\"</code>; such a value now reads both names as properties that don't exist, and the notes fall back to sorting by title. Add a <code>#</code> before each label name to restore it.</p></aside><h2>Grouping with <code>first</code> and <code>last</code></h2><p>A label followed by <code>first</code> or <code>last</code> doesn't sort by the label's value: it places the child notes that have the label, with any value, before or after the rest. The levels that follow then sort within each group. Grouping ignores <code>#sortDirection</code>.</p><p>For example, <code>#sorted=\"#archived last, #priority desc\"</code> on a parent with these children:</p><figure class=\"table\"><table><thead><tr><th>Child note</th><th>Labels</th></tr></thead><tbody><tr><td>Old project</td><td><code>#archived</code> <code>#priority=3</code></td></tr><tr><td>Draft</td><td><code>#priority=1</code></td></tr><tr><td>Launch</td><td><code>#priority=3</code></td></tr><tr><td>Meeting notes</td><td>none</td></tr></tbody></table></figure><p>sorts them as <em>Launch</em>, <em>Draft</em>, <em>Meeting notes</em>, <em>Old project</em>. The <a href=\"#root/_help_MKmLg5x6xkor\">archived note</a> goes below all the others despite its high priority, and the rest are sorted by priority.</p><p><code>folders first</code> and <code>folders last</code> group the notes that have children of their own. A <code>folders</code> level without <code>first</code> or <code>last</code> also places them first, in either direction. <code>#sortFoldersFirst</code> is a shortcut for a <code>folders first</code> level; it has no effect when <code>#sorted</code> already contains <code>folders</code>.</p><h2>Pinning notes to the top or bottom</h2><p>A child note with <code>#top</code> stays at the top of a sorted parent, and one with <code>#bottom</code> stays at the bottom, whatever the levels of <code>#sorted</code> say. When several notes have <code>#top</code>, they are sorted by the label's value, so <code>#top=1</code> comes before <code>#top=2</code>, and a <code>#top</code> without a value comes first. <code>#bottom</code> works the other way round: the last notes are <code>#bottom=2</code>, then <code>#bottom=1</code>, then a <code>#bottom</code> without a value at the very end.</p><p><code>#sortFoldersFirst</code> places the folders right after the <code>#top</code> notes.</p><p>To pin notes within groups instead of the whole list, name <code>#top</code> and <code>#bottom</code> in <code>#sorted</code> at the position where they apply. For example:</p><ul><li><code>#sorted=\"#archived last, #top first, #bottom last, title\"</code> keeps archived notes below all the others, including those with <code>#bottom</code>. <code>#top</code> and <code>#bottom</code> then apply within the archived and the non-archived group separately.</li><li><code>#sorted=\"#archived last, #top first, #bottom last, folders first, title\"</code> also places folders first within each group. <code>#sortFoldersFirst</code> does the same: its <code>folders first</code> level goes right after the last of <code>#top</code> and <code>#bottom</code>.</li><li>Written with <code>first</code> or <code>last</code>, <code>#top</code> and <code>#bottom</code> ignore their values. To order several pinned notes by value, add a level after them, such as <code>#top first, #top, #bottom last, #bottom desc</code>.</li></ul><h2>How values are compared</h2><ul><li>Values are compared as text, character by character, without regard to letter case. Dates in the <code>YYYY-MM-DD</code> form sort correctly, but numbers don't: <code>\"10\"</code> comes before <code>\"2\"</code>. Either pad the numbers with zeros (<code>02</code>, <code>10</code>) or enable <code>#sortNatural</code>.</li><li>With <code>#sortNatural</code>, numbers are compared by their value, and the comparison follows the rules of the language set by <code>#sortLocale</code> (or the default one), which also ignores accents.</li><li>The title of a note includes its <a class=\"reference-link\" href=\"#root/_help_TBwsyfadTA18\">Branch prefix</a>, if it has one in this parent, as <code>prefix - title</code>.</li><li>A label without a value still counts as present: it sorts before the notes that don't have the label, and among the notes that have it, as the smallest value.</li></ul>","_help_NRnIZmSMc5sj": "<figure class=\"image\"><img style=\"aspect-ratio:2023/1488;\" src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/Notes/Printing%20%26%20Exporting%20as%20PDF_image.png\" width=\"2023\" height=\"1488\"><figcaption>Screenshot of the Print preview functionality introduced in v0.103.0.</figcaption></figure><p>Trilium allows printing notes to a real printer, or generating a structured PDF for a single note or for multiple notes through <a class=\"reference-link\" href=\"#root/_help_GTwFsgaA0lCt\">Collections</a>.</p><p>Note that not all note types are printable as of now. We do plan to increase the coverage of supported note types in the future.</p><p>Printing and exporting as PDF are not perfect. Due to technical limitations, and sometimes even browser or Electron glitches the text might appear cut off in some circumstances. </p><h2>Printing a note or exporting as PDF on the desktop</h2><aside class=\"admonition note\"><p>Versions prior to v0.103.0 had two different options, one for printing and another one for exporting to PDF. With the introduction of the print preview, these functions have been unified.</p></aside><p>On the desktop application of Trilium it is possible to export a note as PDF. To print a note:</p><ul><li>Press the menu button in the <a class=\"reference-link\" href=\"#root/_help_8YBEPzcpUgxw\">Note menu</a> and select <em>Print note</em>.</li><li>Alternatively, printing can be triggered from a <a href=\"#root/_help_A9Oc6YKKc65v\">keyboard shortcut</a> (unassigned by default) or through the <a href=\"#root/_help_F1r9QtzQLZqm\">command palette</a>.</li></ul><p>This will trigger the print preview screen next.</p><h3>Print preview & print options</h3><p>The print preview dialog allows the following printing options to be adjusted:</p><ul><li>The printer to use<ul><li><em>Save as PDF</em> generates a PDF that is structured (maintains a table of contents, keeps the text selectable). Prefer this over other virtual PDF printers that ship with the operating system.</li></ul></li><li>Page orientation: <em>Portrait</em> (default) or <em>Landscape</em>.</li><li>Page size</li><li>Scale the entire content from 10% to 200% to improve the fit within the page.</li><li>Margins, which can be removed completely or adjusted individually for all the four edges.</li><li>Print only a subset of pages. Individual page numbers are separated by colons and hyphen-based ranges are supported (e.g. 3-5 for pages 3 to 5).</li></ul><p>Additional interaction:</p><ul><li><em>Print using system dialog</em> allows setting more options that are otherwise not available in Trilium.</li></ul><p>If the note cannot be rendered with the current options, or stops making progress for 30 seconds, the preview is replaced by an error message. Adjust the options to try again.</p><aside class=\"admonition note\"><p>Most of the options here (except printer & which pages to print) are managed at note level through <a class=\"reference-link\" href=\"#root/_help_zEY4DaJG4YT5\">Attributes</a> (such as <code>#printLandscape</code>, <code>#printPageSize</code>, <code>#printScale</code>, <code>#printMargins</code>).</p><p>This means that the print settings will be restored when printing the same note. There are no default settings that can be configured for all the notes, but this can be achieved via <a href=\"#root/_help_bwZpz2ajCEwO\">inheritable attributes</a>.</p></aside><h2>Printing on the browser</h2><p>This feature allows printing of notes. It works on both the desktop client, but also on the web.</p><p>To print a note, click the <a class=\"reference-link\" href=\"#root/_help_8YBEPzcpUgxw\">Note menu</a> and select <em>Print note</em>. Depending on the size and type of the note, this can take up to a few seconds. Afterwards you will be redirected to the system/browser printing dialog.</p><p>On the server or PWA (mobile), the option is not available due to technical constraints and it will be hidden.</p><h2>Reporting issues with the rendering</h2><p>Should you encounter any visual issues in the resulting PDF file (e.g. a table does not fit properly, there is cut off text, etc.) feel free to <a href=\"#root/_help_wy8So3yZZlH9\">report the issue</a>. In this case, it's best to offer a sample note (click on the <span class=\"tn-icon cke cke-three-vertical-dots\"></span> button, select <em>Export note</em> → <em>This note and all of its descendants</em> → <em>HTML in ZIP archive</em>). Make sure not to accidentally leak any personal information.</p><p>Consider adjusting font sizes and using <a href=\"#root/_help_CohkqWQC1iBv\">page breaks</a> to work around the layout.</p><aside class=\"admonition tip\"><p>Although direct export as PDF is not available in the browser version of the application, it's still possible to generate a PDF by selecting the <em>Print</em> option instead and selecting “Save to PDF” as the printer (depending on the browser). Generally, Mozilla Firefox has better printing capabilities.</p></aside><h3>Automatic opening of the file</h3><p>When the PDF is exported, it is automatically opened with the system default application for easy preview.</p><p>Note that if you are using Linux with the GNOME desktop environment, sometimes the default application might seem incorrect (such as opening in GIMP). This is because it uses Gnome's “Recommended applications” list.</p><p>To solve this, you can change the recommended application for PDFs via this command line. First, list the available applications via <code>gio mime application/pdf</code> and then set the desired one. For example to use GNOME's Evince:</p><pre><code class=\"language-text-x-trilium-auto\">gio mime application/pdf</code></pre><h2>Printing multiple notes</h2><p>Since v0.100.0, it is possible to print more than one note at the time by using <a class=\"reference-link\" href=\"#root/_help_GTwFsgaA0lCt\">Collections</a>:</p><ol><li>First create a collection.</li><li>Configure it to use <a class=\"reference-link\" href=\"#root/_help_mULW0Q3VojwY\">List View</a>.</li><li>Print the collection note normally.</li></ol><p>The resulting collection will contain all the children of the collection, while maintaining the hierarchy.</p><aside class=\"admonition note\"><p>Not all note types are supported when printing or exporting to PDF. When an unsupported note is encountered, it is skipped. At the end, if any of the notes were skipped, a message will be displayed with the possibility of viewing the full list of skipped notes. The same limitations as the ones described in <em>Constraints & limitations</em> apply.</p></aside><h2>Keyboard shortcut</h2><p>It's possible to trigger both printing and export as PDF from the keyboard by going to <em>Keyboard shortcuts</em> in <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> and assigning a key combination for:</p><ul><li><em>Print Active Note</em></li><li><em>Export Active Note as PDF</em></li></ul><h2>Constraints & limitations</h2><p>Not all <a class=\"reference-link\" href=\"#root/_help_KSZ04uQ2D1St\">Note Types</a> are supported when printing, in which case the <em>Print</em> and <em>Export as PDF</em> options will be disabled.</p><ul><li>For <a class=\"reference-link\" href=\"#root/_help_iPIMuisry3hd\">Text</a> notes, font, background and table colors are printed in the shades of light themes, whatever the current theme (see <a class=\"reference-link\" href=\"#root/_help_Gr6xFaF6ioJ5\">General formatting</a>).</li><li><a class=\"reference-link\" href=\"#root/_help_6f9hih2hXXZk\">Code</a> notes are printed with line numbers and syntax highlighting, in the <em>Light theme</em> of <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Code Notes</em> → <em>Appearance</em>, whatever the current theme.</li><li>A <a class=\"reference-link\" href=\"#root/_help_HcABDtFCkbFN\">Render Note</a> is printed as it is displayed, without running its script again, once its <code>~renderNote</code> relation is set.</li><li>For <a class=\"reference-link\" href=\"#root/_help_GTwFsgaA0lCt\">Collections</a>, the following are supported:<ul><li><a class=\"reference-link\" href=\"#root/_help_mULW0Q3VojwY\">List View</a>, allowing to print multiple notes at once while preserving hierarchy (similar to a book).</li><li><a class=\"reference-link\" href=\"#root/_help_zP3PMqaG71Ct\">Presentation</a>, where each slide/sub-note is displayed.<ul><li>Most note types are supported, especially the ones that have an image representation such as <a class=\"reference-link\" href=\"#root/_help_grjYqerjn243\">Canvas</a> and <a class=\"reference-link\" href=\"#root/_help_gBbsAeiuUxI5\">Mind Map</a>.</li></ul></li><li><a class=\"reference-link\" href=\"#root/_help_2FvYrpmOXm29\">Table</a>, where the table is rendered in a print-friendly way.<ul><li>Tables that are too complex (especially if they have multiple columns) might not fit properly, however tables with a large number of rows are supported thanks to pagination.</li><li>Consider printing in landscape mode, or using <code>#printLandscape</code> if exporting to PDF.</li></ul></li><li>The rest of the collections are not supported, but we plan to add support for all the collection types at some point.</li></ul></li><li>Using <a class=\"reference-link\" href=\"#root/_help_AlhDUqhENtH7\">Custom app-wide CSS</a> for printing is no longer supported, instead a custom <code>printCss</code> relation needs to be used (see below).</li></ul><h2>Customizing the print CSS</h2><p>As an advanced use case, it's possible to customize the CSS used for printing such as adjusting the fonts, sizes or margins. Note that <a class=\"reference-link\" href=\"#root/_help_AlhDUqhENtH7\">Custom app-wide CSS</a> will not work for printing.</p><p>To do so:</p><ul><li>Create a CSS <a href=\"#root/_help_6f9hih2hXXZk\">code note</a>.</li><li>On the note being printed, apply the <code>~printCss</code> relation to point to the newly created CSS code note.</li><li>To apply the CSS to multiple notes, consider using <a href=\"#root/_help_bwZpz2ajCEwO\">inheritable attributes</a> or <a class=\"reference-link\" href=\"#root/_help_KC1HB96bqqHX\">Templates</a>.</li></ul><p>For example, to change the font of the document from the one defined by the theme or the user to a serif one:</p><pre><code class=\"language-text-x-trilium-auto\">body {\n\t--print-font-family: serif;\n --print-font-size: 11pt;\n}</code></pre><aside class=\"admonition important\"><p>When altering <code>--print-font-family</code>, make sure the change is done at <code>body</code> level and not <code>:root</code>, since otherwise it won't be picked up due to specificity rules.</p></aside><p>To remark:</p><ul><li>Multiple CSS notes can be add by using multiple <code>~printCss</code> relations.</li><li>If the note pointing to the <code>printCss</code> doesn't have the right note type or mime type, it will be ignored.</li><li>If migrating from a previous version where <a class=\"reference-link\" href=\"#root/_help_AlhDUqhENtH7\">Custom app-wide CSS</a>, there's no need for <code>@media print {</code> since the style-sheet is used only for printing.</li></ul><h2>Under the hood</h2><p>Both printing and exporting as PDF use the same mechanism: a note is rendered individually in a separate webpage that is then sent to the browser or the Electron application either for printing or exporting as PDF.</p><p>The webpage that renders a single note can actually be accessed in a web browser. For example <code>http://localhost:8080/#root/WWRGzqHUfRln/RRZsE9Al8AIZ?ntxId=0o4fzk</code> becomes <code>http://localhost:8080/?print#root/WWRGzqHUfRln/RRZsE9Al8AIZ</code>.</p><p>Accessing the print note in a web browser allows for easy debugging to understand why a particular note doesn't render well. The mechanism for rendering is similar to the one used in <a class=\"reference-link\" href=\"#root/_help_0ESUbbAxVnoK\">Note List</a>.</p>","_help_CoFPLs3dRlXc": "<p>Some note types such as <a class=\"reference-link\" href=\"#root/_help_iPIMuisry3hd\">Text</a>, <a class=\"reference-link\" href=\"#root/_help_6f9hih2hXXZk\">Code</a> notes and even some of the <a class=\"reference-link\" href=\"#root/_help_GTwFsgaA0lCt\">Collections</a> can be set to read-only. When a note is in read-only mode, it is presented to the user in a non-editable view, with the option to switch to editing mode if needed.</p><h2>Automatic read-only mode</h2><p>For optimization purposes, Trilium will automatically set very large notes to read-only. Displaying such lengthy notes in editing mode can slow down performance, especially when editing is unnecessary.</p><p>This behavior can be disabled on a per-note basis, by following the instructions of the next section.</p><p>In addition, it's possible to change the number of characters at which the automatic read-only mode will trigger in <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> by going to the options for <a class=\"reference-link\" href=\"#root/_hidden/_options/_optionsTextNotes\">Text Notes</a> and <a class=\"reference-link\" href=\"#root/_hidden/_options/_optionsCodeNotes\">Code Notes</a>.</p><h2>Changing a note's read-only behavior</h2><p>A note's read-only behavior can be changed via <a class=\"reference-link\" href=\"#root/_help_8YBEPzcpUgxw\">Note menu</a> → <em>Editable.</em> The following options are possible:</p><ul><li><strong>Auto</strong><br>This is the default behavior in which the note will be editable by default, unless it becomes large enough to trigger read-only mode.</li><li><strong>Read-only</strong><br>The note will be always marked as read-only, regardless of its size. Nevertheless, it's still possible to temporarily edit the note if needed. This is generally useful for notes that are not prone to change.</li><li><strong>Always Editable</strong><br>This option will bypass the automatic read-only activation for this particular note. It's useful for large notes that are frequently edited.</li></ul><p>If the <em>Editable</em> section is missing from the <a class=\"reference-link\" href=\"#root/_help_8YBEPzcpUgxw\">Note menu</a>, then the note type does not support read-only mode.</p><h3>Manually setting the options</h3><p>Apart from using the <a class=\"reference-link\" href=\"#root/_help_8YBEPzcpUgxw\">Note menu</a> as previously mentioned, it's also possible to use <a href=\"#root/_help_zEY4DaJG4YT5\">labels</a> to change the behavior:</p><ul><li>To set as read-only, apply the <code>readOnly</code> label to the note.</li><li>To disable automatic read-only (always editable), apply the <code>autoReadOnlyDisabled</code> label.</li></ul><h2>Temporarily editing a read-only note</h2><p>When accessing a read-only note, it's possible to temporarily edit it pressing the <em>Read-only</em> badge.</p><p>When pressed, the note will become editable but will become read-only again after navigating to a different note.</p><p>The pages of the built-in user guide are an exception: they are part of Trilium itself and cannot be edited, not even temporarily. Their <em>Read-only</em> badge cannot be pressed, the note menu does not offer to edit them, and their attributes are shown in the right sidebar without a way to change them.</p>","_help_0ESUbbAxVnoK": "<figure class=\"image\"><img style=\"aspect-ratio:990/590;\" src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/Notes/Note%20List_image.png\" width=\"990\" height=\"590\"></figure><p>When a note has one or more child notes, they will be listed at the end of the note for easy navigation.</p><h2>Configuration</h2><ul><li>To hide the note list for a particular note, simply apply the <code>hideChildrenOverview</code> <a href=\"#root/_help_zEY4DaJG4YT5\">label</a>.</li><li>For some view types, such as Grid view, only a subset of notes will be displayed and pagination can be used to navigate through all of them for performance reasons. To adjust the number of notes per page, set <code>pageSize</code> to the desired number.</li></ul><h2>View types</h2><p>The view types dictate how the child notes are represented. By default, the notes will be displayed in a grid, however there are also some other view types available.</p><p>Generally the view type can only be changed from the <a class=\"reference-link\" href=\"#root/_help_CssoWBu8I7jF\">Collection Properties</a>, but it can also be changed manually on any type of note using the <code>#viewType</code> <a href=\"#root/_help_HI6GBBIduIgv\">label</a>.</p>",diff --git a/docs/User Guide/User Guide/Basic Concepts and Features/Notes/Sorting Notes.md b/docs/User Guide/User Guide/Basic Concepts and Features/Notes/Sorting Notes.mdindex 447d51cc95..db81ae44e6 100644--- a/docs/User Guide/User Guide/Basic Concepts and Features/Notes/Sorting Notes.md+++ b/docs/User Guide/User Guide/Basic Concepts and Features/Notes/Sorting Notes.md@@ -1,72 +1,98 @@# Sorting Notes-## Manual sorting--You can sort notes by right-clicking the parent note in the <a class="reference-link" href="../UI%20Elements/Note%20Tree.md">Note Tree</a> and selecting Advanced -> Sort notes by ... This will sort existing notes, but will not automatically sort future notes added to this parent note.--The sorting dialog allows:--* Sorting by title, creation or modification date, or by the value of a label on the child notes.-* Sorting by several such criteria in turn, each ascending or descending: the next level only decides between notes the previous ones left equal.-* Ensuring folders are displayed at the top.-* Natural sort, based on the sorting rules of a particular language.--## Automatic/Permanent Sorting--Child notes can be automatically sorted by attaching specific [labels](../../Advanced%20Usage/Attributes.md) to the parent note:--<table>- <thead>- <tr>- <th>Label</th>- <th>Description</th>- </tr>- </thead>- <tbody>- <tr>- <td><code>#sorted</code></td>- <td><p>Keeps child notes sorted by title alphabetically.</p><p>When given a value, it will sort by other criteria instead: a comma-separated list of levels, each a label on the child notes written with <code>#</code>, or one of the properties <code>title</code>, <code>dateCreated</code>, <code>dateModified</code> and <code>folders</code>, optionally followed by <code>asc</code> or <code>desc</code>, as in a search's <code>orderBy</code>. For example <code>#sorted="#priority desc, #dueDate"</code> sorts by priority, highest first, and notes of equal priority by due date. A child note without a level's label sorts after every child that has it, whichever direction the level runs in. When neither note has the label, the next level decides.</p><p>A label followed by <code>first</code> or <code>last</code> instead groups the child notes that have it before or after the rest, whatever its value. For example <code>#sorted="#archived last, title"</code> keeps <a href="Archived%20Notes.md">archived notes</a> below the others.</p></td>- </tr>- <tr>- <td><code>#sortDirection</code></td>- <td><p>If <code>sorted</code> is applied, specifies the direction of the sort:</p><ul><li><code>ASC</code>, ascending (default)</li><li><code>DESC</code>, descending</li></ul><p>A level of <code>sorted</code> followed by its own <code>asc</code> or <code>desc</code> keeps that direction regardless, and so does a <code>first</code> or <code>last</code> group.</p></td>- </tr>- <tr>- <td><code>#sortFoldersFirst</code></td>- <td>If <code>sorted</code> is applied, folders (notes with children) will be sorted as a group at the top (at the bottom when <code>#sortDirection</code> is <code>desc</code>), and the rest will be sorted. Ignored when <code>sorted</code> places <code>folders</code> itself.</td>- </tr>- <tr>- <td><code>#sortNatural</code></td>- <td>Sort numbers naturally instead of alphabetically, so 2 comes before 10.</td>- </tr>- <tr>- <td><code>#sortLocale</code></td>- <td>The language code driving the natural sort (e.g. <code>zh-CN</code>, <code>de</code>). Only meaningful together with <code>#sortNatural</code>.</td>- </tr>- <tr>- <td><code>#top</code></td>- <td>If <code>sorted</code> is applied to the parent note, keeps given note on top in its parent.</td>- </tr>- <tr>- <td><code>#bottom</code></td>- <td>If <code>sorted</code> is applied to the parent note, keeps given note on bottom in its parent.</td>- </tr>- </tbody>-</table>--Sorting is done by comparing note properties or specific labels on child notes. There are four sorting levels, with the first having the highest priority. Lower priority levels are applied only if higher priority comparisons result in equality.--1. **Top Label Sorting**: Child notes with the `#top` label will appear at the top of the folder, unless `#sorted` places `#top` itself (see below).-2. **Bottom Label Sorting**: (Introduced in Trilium 0.62) Child notes with the `#bottom` label will appear at the bottom of the folder, unless `#sorted` places `#bottom` itself.-3. **Property/Label-Based Sorting**: Sorting is based on the parent note's `#sorted` label:- * **Default Sorting**: If `#sorted` has no value, notes are sorted alphabetically.- * **Property Sorting**: If `#sorted` is set to `title`, `dateModified`, or `dateCreated`, notes are sorted based on the specified property. The `folders` property, which notes with children have, is meant for grouping, as in `folders first`, which a bare `folders` level also does since notes without children sort after those with; on its own, `#sorted=folders` still sorts by a `#folders` label.- * **Label Sorting**: If `#sorted` is set to the name of a child note's label, sorting is based on the values of this label. For example, setting `#sorted=#myOrder` on the parent note and using `#myOrder=001`, `#myOrder=002`, etc., on child notes. A single name without `#` that is not one of the properties above is also treated as a label, so `#sorted=myOrder` works the same way.- * **Multi-Level Sorting**: Several of the above can be combined, separated by commas; each level is applied only where the previous ones are equal. A label is written with `#` and a property without it. Every level can carry its own direction as a word after the name, `asc` or `desc`, otherwise it follows `#sortDirection`. For example `#sorted="#priority desc, #area, dateCreated"` sorts by priority, highest first, then by area, then by creation date.- * **Grouping**: A label, or `folders`, followed by `first` or `last` puts the child notes that have it, with any value, before or after the rest, regardless of `#sortDirection`. The following levels then sort within each group. For example `#sorted="#archived last, #priority desc"`. Notes with `#top` or `#bottom` stay at the top or bottom even when they belong to a group, unless `#sorted` names those labels too.- * **Placing `#top` and `#bottom`**: Naming `#top` or `#bottom` in `#sorted` applies it at that position instead of before every level. For example `#sorted="#archived last, #top first, #bottom last, title"` keeps archived notes below all the others, including those with `#bottom`, and `#top` and `#bottom` then apply within each of the two groups. Adding `folders first` after them, as in `#sorted="#archived last, #top first, #bottom last, folders first, title"`, groups folders within each group too, so archived folders sort below the other notes. `#sortFoldersFirst` places `folders first` the same way, right after the last of `#top` and `#bottom`. Written with `first` or `last`, the labels ignore their values; to order several pinned notes by value, add a level such as `#top` or `#bottom desc` after them.-4. **Alphabetical Sorting**: Used as a last resort when other criteria result in equality.+Trilium can sort the child notes of a note once, using the _Sort by…_ dialog, or keep them sorted permanently, using the `#sorted` label. Both sort by the same criteria: the title, the creation or modification date, or the value of a label on the child notes, and both can combine several of these into sorting levels.++## Sorting once with the dialog++To sort the children of a note once, right-click it in the <a class="reference-link" href="../UI%20Elements/Note%20Tree.md">Note Tree</a> and select _Sort by…_, or select it and press <kbd>Alt</kbd>+<kbd>S</kbd>. The order is applied to the existing child notes only; notes added later are placed wherever they are created.++The dialog consists of:++* _Sorting criteria_, a list of levels. Each level sorts by _Title_, _Date created_, _Date modified_ or _Label_ (followed by the name of the label), _Ascending_ or _Descending_.+ * To sort by more than one criterion, select _Add level_. The first level decides the order; the next level only decides between notes the previous ones left equal (see _Sort levels_ below).+ * To change the order of the levels, use the <span class="tn-icon bx bx-up-arrow-alt"></span> and <span class="tn-icon bx bx-down-arrow-alt"></span> buttons. To remove a level, use the <span class="tn-icon bx bx-x"></span> button.+* _Sort folders at the top_, which places notes that have children of their own before the others. When the first level is descending, they are placed at the bottom instead.+* _Natural sort_, which compares numbers and characters by the rules of a language (see _How values are compared_ below). _Natural sort language_ sets the language code, for example `zh-CN` for Chinese.++Notes with `#top` or `#bottom` stay at the top or bottom, as with automatic sorting (see _Pinning notes to the top or bottom_ below).++## Keeping child notes sorted++To keep the children of a note sorted, add the `#sorted` [label](../../Advanced%20Usage/Attributes/Labels.md) to it. Trilium sorts its child notes again whenever a child is added or changes, and whenever the sorting labels change.++| Label | Description |+| --- | --- |+| `#sorted` | Keeps the child notes sorted. Without a value, they are sorted by title; with a value, by the levels it lists (see _Sort levels_ below). `#sorted=off` turns sorting off. |+| `#sortDirection` | `asc` (the default) or `desc`. The direction of every level that doesn't specify its own. |+| `#sortFoldersFirst` | Places notes that have children of their own before the others, or after them when `#sortDirection` is `desc`. |+| `#sortNatural` | Compares numbers by their value instead of character by character, so 2 comes before 10. |+| `#sortLocale` | The language code for `#sortNatural`, for example `zh-CN` or `de`. |+| `#top` | On a child note: keeps it at the top of its sorted parent. |+| `#bottom` | On a child note: keeps it at the bottom of its sorted parent. |++The labels apply to the note that carries them and, when made [inheritable](../../Advanced%20Usage/Attributes/Attribute%20Inheritance.md), to every note below it, so a single `#sorted(inheritable)` sorts a whole subtree. A note created from a [template](../../Advanced%20Usage/Templates.md) that has `#sorted` keeps its children sorted too. To exclude part of such a subtree, add `#sorted=off` to the note whose children must keep their manual order; to exclude everything below it as well, make that label inheritable too.++## Sort levels++The value of `#sorted` is a comma-separated list of levels, written like the `orderBy` of a [search](../Navigation/Search.md). Each level is one of:++* A label on the child notes, written with `#`, such as `#priority`.+* One of the properties `title`, `dateCreated` and `dateModified`, written without `#`.+* `folders`, which only the notes with children of their own have (see _Grouping_ below).++A level can be followed by `asc` or `desc` to set its direction; otherwise it follows `#sortDirection`.++The child notes are sorted by the first level. Notes that are equal at that level are sorted by the second level, and so on. Notes equal at every level are sorted by title, in the direction of `#sortDirection`.++A child note that doesn't have a level's label is placed after every child that has it, whichever direction the level runs in. Between two notes that both lack it, the next level decides.++For example, `#sorted="#priority desc, #dueDate"` on a parent with these children:++| Child note | Labels |+| --- | --- |+| Book report | `#priority=2` `#dueDate=2026-11-01` |+| Groceries | `#priority=1` |+| Taxes | `#priority=2` `#dueDate=2026-10-25` |+| Ideas | none |++sorts them as _Taxes_, _Book report_, _Groceries_, _Ideas_. The highest priority comes first; _Taxes_ and _Book report_ share it, so the earlier due date decides between them. _Ideas_ has no priority and goes last.++A value that is a single name without `#` is read the way older versions did: `title`, `dateCreated` or `dateModified` is a property, and any other name is a label, so `#sorted=myOrder` sorts by the `#myOrder` label of the children.> [!WARNING]-> Since v0.107.0, a label in a multi-level `#sorted` must be written with `#`. In v0.106.0 the names were written bare, as in `#sorted="priority desc, dueDate"`; such a value now reads both names as properties that do not exist and falls back to sorting by title. Add a `#` before each label name to restore it.+> Since v0.107.0, a label in a `#sorted` value with more than one level, or with a direction, must be written with `#`. In v0.106.0 the names were written bare, as in `#sorted="priority desc, dueDate"`; such a value now reads both names as properties that don't exist, and the notes fall back to sorting by title. Add a `#` before each label name to restore it.++## Grouping with `first` and `last`++A label followed by `first` or `last` doesn't sort by the label's value: it places the child notes that have the label, with any value, before or after the rest. The levels that follow then sort within each group. Grouping ignores `#sortDirection`.++For example, `#sorted="#archived last, #priority desc"` on a parent with these children:++| Child note | Labels |+| --- | --- |+| Old project | `#archived` `#priority=3` |+| Draft | `#priority=1` |+| Launch | `#priority=3` |+| Meeting notes | none |++sorts them as _Launch_, _Draft_, _Meeting notes_, _Old project_. The [archived note](Archived%20Notes.md) goes below all the others despite its high priority, and the rest are sorted by priority.++`folders first` and `folders last` group the notes that have children of their own. A `folders` level without `first` or `last` also places them first, in either direction. `#sortFoldersFirst` is a shortcut for a `folders first` level; it has no effect when `#sorted` already contains `folders`.++## Pinning notes to the top or bottom++A child note with `#top` stays at the top of a sorted parent, and one with `#bottom` stays at the bottom, whatever the levels of `#sorted` say. When several notes have `#top`, they are sorted by the label's value, so `#top=1` comes before `#top=2`, and a `#top` without a value comes first. `#bottom` works the other way round: the last notes are `#bottom=2`, then `#bottom=1`, then a `#bottom` without a value at the very end.++`#sortFoldersFirst` places the folders right after the `#top` notes.++To pin notes within groups instead of the whole list, name `#top` and `#bottom` in `#sorted` at the position where they apply. For example:++* `#sorted="#archived last, #top first, #bottom last, title"` keeps archived notes below all the others, including those with `#bottom`. `#top` and `#bottom` then apply within the archived and the non-archived group separately.+* `#sorted="#archived last, #top first, #bottom last, folders first, title"` also places folders first within each group. `#sortFoldersFirst` does the same: its `folders first` level goes right after the last of `#top` and `#bottom`.+* Written with `first` or `last`, `#top` and `#bottom` ignore their values. To order several pinned notes by value, add a level after them, such as `#top first, #top, #bottom last, #bottom desc`.++## How values are compared-All comparisons are made string-wise (e.g., "1" \< "2" or "2020-10-10" < "2021-01-15", but also "2" \> "10").\ No newline at end of file+* Values are compared as text, character by character, without regard to letter case. Dates in the `YYYY-MM-DD` form sort correctly, but numbers don't: `"10"` comes before `"2"`. Either pad the numbers with zeros (`02`, `10`) or enable `#sortNatural`.+* With `#sortNatural`, numbers are compared by their value, and the comparison follows the rules of the language set by `#sortLocale` (or the default one), which also ignores accents.+* The title of a note includes its <a class="reference-link" href="Cloning%20Notes/Branch%20prefix.md">Branch prefix</a>, if it has one in this parent, as `prefix - title`.+* A label without a value still counts as present: it sorts before the notes that don't have the label, and among the notes that have it, as the smallest value.\ No newline at end of filediff --git a/docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Note Tree/Keyboard shortcuts.md b/docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Note Tree/Keyboard shortcuts.mdindex 89e5e72c8d..e62911f260 100644--- a/docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Note Tree/Keyboard shortcuts.md+++ b/docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Note Tree/Keyboard shortcuts.md@@ -25,6 +25,7 @@ The <a class="reference-link" href="../Note%20Tree.md">Note Tree</a> comes wit* <kbd>Ctrl</kbd> + <kbd><span>←</span></kbd> - move note up in the note tree.* <kbd>Ctrl</kbd>+<kbd><span>→</span></kbd> - move note down in the note tree.* <kbd>Del</kbd> - deletes note and optionally its subtree (asked in the dialog).+* <kbd>Alt</kbd>+<kbd>S</kbd> - sorts the child notes of the note (see <a class="reference-link" href="../../Notes/Sorting%20Notes.md">Sorting Notes</a>).## Multiple selection