Skip to content

Build your personal knowledge base with Trilium Notes

fix(text): keep list markers next to aligned text (closes #8622)

Elian Doranbdd66d1fe5cf
diff --git a/apps/client/src/index.ts b/apps/client/src/index.ts
index 7469ca7360..eedd0356dd 100644
--- a/apps/client/src/index.ts
+++ b/apps/client/src/index.ts
@@ -7,6 +7,7 @@ import "@triliumnext/ckeditor5/src/theme/collapsible_blocks.css";
import "@triliumnext/ckeditor5/src/theme/external_links.css";
import "@triliumnext/ckeditor5/src/theme/footnotes.css";
import "@triliumnext/ckeditor5/src/theme/headings.css";
+import "@triliumnext/ckeditor5/src/theme/lists.css";
import "@triliumnext/ckeditor5/src/theme/reference_links.css";
import "@triliumnext/ckeditor5/src/theme/table_scroll.css";
import "@triliumnext/ckeditor5/src/theme/table_sticky_header.css";
diff --git a/apps/server/src/assets/help/help_content.json b/apps/server/src/assets/help/help_content.json
index 73f2a2bb39..201b838c98 100644
--- a/apps/server/src/assets/help/help_content.json
+++ b/apps/server/src/assets/help/help_content.json
@@ -143,7 +143,7 @@
"_help_3IDVtesTQ8ds": "<p>An external link is a standard web link targeting for example a website. For example, <a href=\"https://en.wikipedia.org/wiki/South_China_Sea\">https://en.wikipedia.org/wiki/South_China_Sea</a> is an external link to a Wikipedia page.</p><p>To create a link without a custom text:</p><ul><li>Press&nbsp;<span class=\"tn-icon cke cke-link\"></span> in the&nbsp;<a class=\"reference-link\" href=\"#root/_help_nRhnJkTT8cPs\">Formatting toolbar</a>:<ul><li>A popup will appear, type or paste the URL in the box.</li><li>Press <kbd>Enter</kbd> or the check mark icon to confirm.</li></ul></li><li>Alternatively, press <kbd>Ctrl</kbd>+<kbd>K</kbd> to trigger the aforementioned popup.</li><li>A simpler way is to paste the raw link and press space to turn it automatically into a link.</li><li>Since v0.107.0, the <em>Add link</em> dialog of <a class=\"reference-link\" href=\"#root/_help_hrZ1D00cLbal\">Internal (reference) links</a> (<kbd>Ctrl</kbd>+<kbd>L</kbd> or the <span class=\"tn-icon cke cke-trilium\"></span> button) creates external links as well. Select <em>Web link</em> at the top of the dialog, type or paste the address, and optionally a <em>Link title</em>; without one, the link shows its address. An address without a scheme, such as <code>example.com</code>, gets <code>https://</code>. A URL pasted into the <em>Note</em> field, or picked from its search, switches the dialog to <em>Web link</em>. The dialog also opens on <em>Web link</em> when the selected text is a URL.</li></ul><p>To create a link with a custom text:</p><ul><li>First, type and select the text which will be turned into a link.</li><li>Follow the previous steps to open the link interface (via the formatting toolbar, or <kbd>Ctrl</kbd>+<kbd>K</kbd>).</li><li>Alternatively, simply paste (<kbd>Ctrl</kbd>+<kbd>V</kbd>) over the selected text to turn it into a link.</li></ul><p>Once a link is inserted:</p><ul><li>The text inside the link can be changed if needed but the link itself will remain.</li><li>To modify the link, click on the link to display the popup and press the&nbsp;<span class=\"tn-icon cke cke-pencil\"></span> <em>Edit link</em> button. Since v0.107.0, it opens the <em>Edit link</em> dialog, filled with the link's address and text, as do placing the cursor inside the link and pressing <kbd>Ctrl</kbd>+<kbd>L</kbd> or the <span class=\"tn-icon cke cke-trilium\"></span> button. <em>Save link</em> changes the whole link, its text included, and the dialog can also turn it into a link to a note.</li><li>To remove a link, click on it and press the&nbsp;<span class=\"tn-icon cke cke-unlink\"></span> <em>Unlink</em> button.</li></ul><p>You can follow external link by either double clicking (will open new tab/window) it or right clicking on them and choosing \"Open in new tab\".</p>",
"_help_hrZ1D00cLbal": "<p>Internal links are links to other notes within Trilium.</p><p>You can open an internal link by clicking it. You can also see a read-only preview of an internal link's contents by hovering over it.</p><h2>Inserting internal links</h2><p>Internal links can be created at the current position in a text note by:</p><ol><li>Pressing <kbd>Ctrl</kbd> + <kbd>L</kbd> or the&nbsp;<span class=\"tn-icon cke cke-trilium\"></span> button underneath the&nbsp;<span class=\"tn-icon cke cke-plus\"></span> menu in the&nbsp;<a class=\"reference-link\" href=\"#root/_help_nRhnJkTT8cPs\">Formatting toolbar</a>.</li><li>Searching for the title of the desired note to link. It's also possible to create new notes from this dialog by typing a non-existing note title and selecting either <em>Create note</em>, which places it in the&nbsp;<a class=\"reference-link\" href=\"#root/_help_S0Fos78ZfcY7\">Note Inbox</a>&nbsp;(today's day note, or the top level, when no inbox is set), or <em>Create child note</em>, which places it under the note being edited.</li></ol><p>There are two link types, chosen with the <em>Mirror the note's title</em> switch of the dialog, which is on by default:</p><ol><li>With the switch on, the link mirrors the note's title.<ol><li>This is sometimes also called \"reference link\".</li><li>The title of this link cannot be changed. Instead, it will always show the current title of the linked note.</li><li>The icon of the linked note will also be displayed.</li><li>If the linked note is deleted, the link keeps the last title it showed, in red and with a <span class=\"tn-icon bx bx-x\"></span> icon instead of the note icon. Clicking it while editing opens the <em>Fix link</em> dialog, which searches for that title; picking a note, or creating a new one, replaces the link with one to that note.</li></ol></li><li>With the switch off, the link has a title of its own, typed in the <em>Link title</em> field.<ol><li>This will create a traditional hyperlink, where the text of the link can be different from the note title.</li></ol></li></ol><p>Since v0.107.0, to change a link whose title does not mirror the note's, click it and press the <span class=\"tn-icon cke cke-pencil\"></span> <em>Edit link</em> button in its popup, or place the cursor inside it and press <kbd>Ctrl</kbd> + <kbd>L</kbd> or the <span class=\"tn-icon cke cke-trilium\"></span> button. The <em>Edit link</em> dialog opens on the linked note, with its anchor and the link's text; <em>Save link</em> changes the whole link. Turning <em>Mirror the note's title</em> on there turns it into a link that mirrors the title.</p><h2>In-place linking</h2><p>You can also insert internal links “inline” by using the <code>@</code> symbol:</p><ol><li>Type <code>@</code> in a text note, which will open the note search menu.</li><li>Search for the desired note's title by typing a few characters. Use <kbd>Up</kbd> and <kbd>Down</kbd> to select the correct note, and press <kbd>Enter</kbd> or <kbd>Tab</kbd> to create the link. It's also possible to create new notes with this method by typing a non-existing note title and selecting <em>Create note</em> or <em>Create child note</em>, as described above.</li></ol><h2>Pasting internal links</h2><p>You can also insert internal links by copying a note from the note tree.</p><ol><li>In the&nbsp;<a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a>, select a note and press <kbd>Ctrl</kbd> + <kbd>C</kbd>.</li><li>In a text note, paste the link by pressing <kbd>Ctrl</kbd> + <kbd>V</kbd>.</li></ol>",
"_help_wfGXLmm7x27z": "<p>A link points from one note to another; a <em>backlink</em> is that same connection seen from the other end: the list of notes that refer to the current one.</p><p>Backlinks are maintained automatically and are read-only from this side. A backlink disappears when the note that created it removes the link; it cannot be deleted from the note being pointed at.</p><h2>What counts as a backlink</h2><p>Any&nbsp;<a class=\"reference-link\" href=\"#root/_help_hrZ1D00cLbal\">Internal (reference) links</a>&nbsp;pointing at the current note, which covers two rather different cases:</p><ul><li>Relations that Trilium maintains on your behalf.<ul><li>The most common is <code>internalLink</code>, created whenever a note refers to another one through&nbsp;<a class=\"reference-link\" href=\"#root/_help_hrZ1D00cLbal\">Internal (reference) links</a>&nbsp;in its text.</li><li>Embedded images (<code>imageLink</code>), relation map connections (<code>relationMapLink</code>) and note inclusions (<code>includeNoteLink</code>) work the same way.</li></ul></li><li>Relations you define yourself.<ul><li>If another note has <code>~author</code> pointing at the current note, that note is listed here as well.</li></ul></li></ul><p>Relations coming from a&nbsp;<a class=\"reference-link\" href=\"#root/_help_m523cpzocqaD\">Saved Search</a>&nbsp;are excluded, since a search stores an <code>ancestor</code> relation that would otherwise list every one of its results as a backlink.</p><aside class=\"admonition note\"><p>Only some note types have their content scanned for links:&nbsp;<a class=\"reference-link\" href=\"#root/_help_iPIMuisry3hd\">Text</a>,&nbsp;<a class=\"reference-link\" href=\"#root/_help_6RM1Q7ppFVoj\">Markdown</a>,&nbsp;<a class=\"reference-link\" href=\"#root/_help_iRwzGnHPzonm\">Relation Map</a>&nbsp;and&nbsp;<a class=\"reference-link\" href=\"#root/_help_GBBMSlVSOIGP\">AI</a>&nbsp;chats. A link written inside a&nbsp;<a class=\"reference-link\" href=\"#root/_help_6f9hih2hXXZk\">Code</a>&nbsp;note is not registered and will not appear as a backlink on the target note. A relation set manually on a code note does still count.</p></aside><h2>How entries are displayed</h2><p>Each entry names the note the reference comes from, followed by one of:</p><ul><li><strong>An excerpt</strong> of the surrounding content, with the link itself highlighted. This is available for&nbsp;<a class=\"reference-link\" href=\"#root/_help_iPIMuisry3hd\">Text</a>&nbsp;notes and for&nbsp;<a class=\"reference-link\" href=\"#root/_help_GBBMSlVSOIGP\">AI</a>&nbsp;chat notes. Roughly 200 characters of context are quoted around the link, trimmed with an ellipsis where the surrounding text is longer, and images are left out.</li><li><strong>The name of the relation</strong>, for every other note type where the source cannot be quoted. This is the case for&nbsp;<a class=\"reference-link\" href=\"#root/_help_iRwzGnHPzonm\">Relation Map</a>&nbsp;notes and for any note carrying a relation you defined yourself.</li></ul><p>A note is listed once per reference it makes, so a note that links to the current one three times occupies three rows.</p><p>Of note:</p><ul><li>For AI chat notes, only the assistant's own prose is quoted. A chat that reached the note purely through tool calls has nothing to quote and is listed by relation name instead.</li><li>Excerpts are only generated for roughly the first 50 sources. On a heavily referenced note, the remaining entries fall back to showing the relation name.</li></ul><h2>Where backlinks are shown</h2><ul><li>In the&nbsp;<a class=\"reference-link\" href=\"#root/_help_KRlZFoIH0j6p\">Connections tab</a>&nbsp;of the&nbsp;<a class=\"reference-link\" href=\"#root/_help_RnaPdbciOfeq\">Right Sidebar</a>, as a dedicated section.</li><li>As a badge in the&nbsp;<a class=\"reference-link\" href=\"#root/_help_AlJ73vBCjWDw\">Status bar</a>&nbsp;showing the number of backlinks. The badge only appears when the note is being read normally (not in a revision or attachment view) and when there is at least one backlink; pressing it opens the section above.</li><li>In&nbsp;<a class=\"reference-link\" href=\"#root/_help_ZjLYv08Rp3qC\">Quick edit</a>, as a button with a link icon in the header of the popup, under the same conditions; its tooltip gives the number of backlinks. Pressing a backlink opens that note in the popup.</li><li>Incoming links are also drawn on the link map, see&nbsp;<a class=\"reference-link\" href=\"#root/_help_BCkXAVs63Ttv\">Note Map (Link map, Tree map)</a>.</li></ul>",
- "_help_S6Xx8QIWTV66": "<p>There are three types of lists supported by text notes:</p><ul><li><span class=\"tn-icon cke cke-bulleted-list\"></span>&nbsp;Bulleted lists (also known as unordered lists).</li><li><span class=\"tn-icon cke cke-numbered-list\"></span>&nbsp;Numbered lists (or ordered lists).</li><li><span class=\"tn-icon cke cke-todo-list\"></span>&nbsp;To-do lists</li></ul><p>For bulleted and numbered lists, it's possible to configure an alternative marker such as squares or Roman numbering by pressing the&nbsp;<span class=\"tn-icon cke cke-dropdown-arrow\"></span> icon. For numbered lists, it's also possible to specify the number to start at or whether to count in reverse order. On the <a class=\"reference-link\" href=\"#root/_help_RDslemsQ6gCp\">Mobile Frontend</a>, these are in the row of the <em>List ›</em> button, which shows while the cursor is in a list; its <em>List type</em> button also turns the list into another kind, to-do lists included.</p><h2>Keyboard interaction</h2><ul><li>To create a new list:<ul><li>Bulleted list: Start a line with <code>*</code> or <code>-</code> followed by a space;</li><li>Numbered list: Start a line with <code>1.</code> or <code>1)</code> followed by a space;</li><li>To-do list: Start a line with <code>- [ ]</code> for an unchecked item or <code>[x]</code> for a checked item.</li></ul></li><li>To create a new item in the list, press <kbd>Enter</kbd>.</li><li>To create a blank line within a list item, press <kbd>Shift</kbd>+<kbd>Enter</kbd>.</li><li>To exit out of the list, press <kbd>Enter</kbd> twice.</li><li>To merge two lists, simply delete the gap between them.</li><li>To create nested lists, simply use the&nbsp;<span class=\"tn-icon cke cke-indent\"></span> button (see <em>Indentation</em> in&nbsp;<a class=\"reference-link\" href=\"#root/_help_dEHYtoWWi8ct\">Other features</a>) or the <kbd>Tab</kbd> key. To decrease the nesting level for the current element, press <kbd>Shift</kbd>+<kbd>Tab</kbd>.</li></ul><h2>Headings, code blocks within lists</h2><p>It possible to add content-level blocks such as headings, code blocks, tables within lists, as follows:</p><figure class=\"table\"><table><tbody><tr><td>1</td><td><img src=\"{{helpAssets}}/User%20Guide/Note%20Types/Text/2_Lists_image.jpg\"></td><td>First, create a list.</td></tr><tr><td>2</td><td><img src=\"{{helpAssets}}/User%20Guide/Note%20Types/Text/4_Lists_image.jpg\"></td><td>Press Enter to create a new list item.</td></tr><tr><td>3</td><td><img src=\"{{helpAssets}}/User%20Guide/Note%20Types/Text/1_Lists_image.jpg\"></td><td>Press Backspace to get rid of the bullet point. Notice the cursor position.</td></tr><tr><td>4</td><td><img class=\"image_resized\" style=\"aspect-ratio:676/112;width:98.29%;\" src=\"{{helpAssets}}/User%20Guide/Note%20Types/Text/5_Lists_image.jpg\" width=\"676\" height=\"112\"></td><td>At this point, insert any desired block-level item such as a code block.</td></tr><tr><td>5</td><td><img class=\"image_resized\" style=\"aspect-ratio:675/129;width:94.22%;\" src=\"{{helpAssets}}/User%20Guide/Note%20Types/Text/3_Lists_image.jpg\" width=\"675\" height=\"129\"></td><td>To continue with a new bullet point, press Enter until the cursor moves to a new blank position.</td></tr><tr><td>6</td><td><img class=\"image_resized\" style=\"aspect-ratio:675/129;width:100%;\" src=\"{{helpAssets}}/User%20Guide/Note%20Types/Text/Lists_image.jpg\" width=\"675\" height=\"129\"></td><td>Press Enter once more to create the new bullet.</td></tr></tbody></table></figure><p>The same principle applies to all three list types (bullet, numbered and to-do).</p><h2>To-do lists</h2><p>See&nbsp;<a class=\"reference-link\" href=\"#root/_help_fASfBrYnquKU\">To-do Lists</a>.</p><h2>Collapsible lists</h2><p>Starting with Trilium v0.104.0, it is possible to collapse nested list items. This applies to bullet lists, numbered lists as well as to-do lists.</p><p>To collapse or expand a list item that has nested sub-items:</p><ul><li>Using the mouse, move the cursor over the list item and an arrow will appear to its left. Clicking it will toggle between collapsed and expanded.</li><li>For bullet lists and numbered lists, it's also possible to click directly on the marker (e.g. the bullet or the number) instead of on the arrow to collapse or expand it. This won't work for to-do lists since this would toggle the to-do instead.</li><li>Press <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>Enter</kbd> which will toggle the collapse/expand state for the item at the cursor position.</li></ul><p>Of note:</p><ul><li>Collapsed items always show the arrow to indicate its state.</li><li>The collapsed state is saved at note level and synced across instances, which means that it will restore after a refresh or reopening of the application.</li><li>The collapsed state is also persisted in&nbsp;<a class=\"reference-link\" href=\"#root/_help_mHbBMPDPkVV5\">Import &amp; Export</a>, but only for the HTML format. Markdown exports will not preserve the collapse state.</li><li>Collapsible bullets only exist in the context of editable text notes. Read-only lists will always be fully expanded.</li><li>The list items will auto-expand on edit to avoid typing in a hidden area.</li></ul>",
+ "_help_S6Xx8QIWTV66": "<p>There are three types of lists supported by text notes:</p><ul><li><span class=\"tn-icon cke cke-bulleted-list\"></span>&nbsp;Bulleted lists (also known as unordered lists).</li><li><span class=\"tn-icon cke cke-numbered-list\"></span>&nbsp;Numbered lists (or ordered lists).</li><li><span class=\"tn-icon cke cke-todo-list\"></span>&nbsp;To-do lists</li></ul><p>For bulleted and numbered lists, it's possible to configure an alternative marker such as squares or Roman numbering by pressing the&nbsp;<span class=\"tn-icon cke cke-dropdown-arrow\"></span> icon. For numbered lists, it's also possible to specify the number to start at or whether to count in reverse order. On the <a class=\"reference-link\" href=\"#root/_help_RDslemsQ6gCp\">Mobile Frontend</a>, these are in the row of the <em>List ›</em> button, which shows while the cursor is in a list; its <em>List type</em> button also turns the list into another kind, to-do lists included.</p><h2>Keyboard interaction</h2><ul><li>To create a new list:<ul><li>Bulleted list: Start a line with <code>*</code> or <code>-</code> followed by a space;</li><li>Numbered list: Start a line with <code>1.</code> or <code>1)</code> followed by a space;</li><li>To-do list: Start a line with <code>- [ ]</code> for an unchecked item or <code>[x]</code> for a checked item.</li></ul></li><li>To create a new item in the list, press <kbd>Enter</kbd>.</li><li>To create a blank line within a list item, press <kbd>Shift</kbd>+<kbd>Enter</kbd>.</li><li>To exit out of the list, press <kbd>Enter</kbd> twice.</li><li>To merge two lists, simply delete the gap between them.</li><li>To create nested lists, simply use the&nbsp;<span class=\"tn-icon cke cke-indent\"></span> button (see <em>Indentation</em> in&nbsp;<a class=\"reference-link\" href=\"#root/_help_dEHYtoWWi8ct\">Other features</a>) or the <kbd>Tab</kbd> key. To decrease the nesting level for the current element, press <kbd>Shift</kbd>+<kbd>Tab</kbd>.</li></ul><h2>Headings, code blocks within lists</h2><p>It possible to add content-level blocks such as headings, code blocks, tables within lists, as follows:</p><figure class=\"table\"><table><tbody><tr><td>1</td><td><img src=\"{{helpAssets}}/User%20Guide/Note%20Types/Text/2_Lists_image.jpg\"></td><td>First, create a list.</td></tr><tr><td>2</td><td><img src=\"{{helpAssets}}/User%20Guide/Note%20Types/Text/4_Lists_image.jpg\"></td><td>Press Enter to create a new list item.</td></tr><tr><td>3</td><td><img src=\"{{helpAssets}}/User%20Guide/Note%20Types/Text/1_Lists_image.jpg\"></td><td>Press Backspace to get rid of the bullet point. Notice the cursor position.</td></tr><tr><td>4</td><td><img class=\"image_resized\" style=\"aspect-ratio:676/112;width:98.29%;\" src=\"{{helpAssets}}/User%20Guide/Note%20Types/Text/5_Lists_image.jpg\" width=\"676\" height=\"112\"></td><td>At this point, insert any desired block-level item such as a code block.</td></tr><tr><td>5</td><td><img class=\"image_resized\" style=\"aspect-ratio:675/129;width:94.22%;\" src=\"{{helpAssets}}/User%20Guide/Note%20Types/Text/3_Lists_image.jpg\" width=\"675\" height=\"129\"></td><td>To continue with a new bullet point, press Enter until the cursor moves to a new blank position.</td></tr><tr><td>6</td><td><img class=\"image_resized\" style=\"aspect-ratio:675/129;width:100%;\" src=\"{{helpAssets}}/User%20Guide/Note%20Types/Text/Lists_image.jpg\" width=\"675\" height=\"129\"></td><td>Press Enter once more to create the new bullet.</td></tr></tbody></table></figure><p>The same principle applies to all three list types (bullet, numbered and to-do).</p><h2>Alignment</h2><p>A list item can be centered or aligned to the right, either with the text alignment button in the formatting toolbar or by aligning the <a class=\"reference-link\" href=\"#root/_help_NdowYOC1GFKS\">Tables</a> cell that contains the list. The bullet, number or checkbox then moves together with the text of the item.</p><h2>To-do lists</h2><p>See&nbsp;<a class=\"reference-link\" href=\"#root/_help_fASfBrYnquKU\">To-do Lists</a>.</p><h2>Collapsible lists</h2><p>Starting with Trilium v0.104.0, it is possible to collapse nested list items. This applies to bullet lists, numbered lists as well as to-do lists.</p><p>To collapse or expand a list item that has nested sub-items:</p><ul><li>Using the mouse, move the cursor over the list item and an arrow will appear to its left. Clicking it will toggle between collapsed and expanded.</li><li>For bullet lists and numbered lists, it's also possible to click directly on the marker (e.g. the bullet or the number) instead of on the arrow to collapse or expand it. This won't work for to-do lists since this would toggle the to-do instead.</li><li>Press <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>Enter</kbd> which will toggle the collapse/expand state for the item at the cursor position.</li></ul><p>Of note:</p><ul><li>Collapsed items always show the arrow to indicate its state.</li><li>The collapsed state is saved at note level and synced across instances, which means that it will restore after a refresh or reopening of the application.</li><li>The collapsed state is also persisted in&nbsp;<a class=\"reference-link\" href=\"#root/_help_mHbBMPDPkVV5\">Import &amp; Export</a>, but only for the HTML format. Markdown exports will not preserve the collapse state.</li><li>Collapsible bullets only exist in the context of editable text notes. Read-only lists will always be fully expanded.</li><li>The list items will auto-expand on edit to avoid typing in a hidden area.</li></ul>",
"_help_QrtTYPmdd1qq": "<p>Markdown-like formatting allows inserting some basic formatting by typing the Markdown equivalent. Note that this does not mean that&nbsp;<a class=\"reference-link\" href=\"#root/_help_iPIMuisry3hd\">Text</a>&nbsp;notes supports Markdown, these are just some convenience shortcuts.</p><p>To import more complex formatting into text notes, consider using the <a href=\"#root/_help_dEHYtoWWi8ct\"><em>Import from Markdown</em></a> function. For fully-fleged Markdown notes imports, consider using the dedicated <a href=\"#root/_help_Oau6X9rCuegd\">import</a> function.</p><ul><li>For <a href=\"#root/_help_Gr6xFaF6ioJ5\">headings:</a><ul><li><code>##</code> for Heading 2 (the first-level heading is reserved for the note title).</li><li><code>###</code> for Heading 3</li><li><code>####</code> for Heading 4</li><li><code>#####</code> for Heading 5</li><li><code>######</code> for Heading 6</li></ul></li><li>For&nbsp;<a class=\"reference-link\" href=\"#root/_help_Gr6xFaF6ioJ5\">General formatting</a>:<ul><li><strong>Bold</strong>: Type <code>**text**</code> or <code>__text__</code></li><li><em>Italic</em>: Type <code>*text*</code> or <code>_text_</code></li><li><del>Strikethrough</del>: Type <code>~~text~~</code></li></ul></li><li>For&nbsp;<a class=\"reference-link\" href=\"#root/_help_S6Xx8QIWTV66\">Lists</a>:<ul><li>Bulleted list: Start a line with <code>*</code> or <code>-</code> followed by a space;</li><li>Numbered list: Start a line with <code>1.</code> or <code>1)</code> followed by a space;</li><li>To-do list: Start a line with <code>[ ]</code> for an unchecked item or <code>[x]</code> for a checked item.</li></ul></li><li>For <a href=\"#root/_help_NwBbFdNZ9h7O\">block quotes</a>, press <code>&gt;</code>, followed by a space.</li><li>For&nbsp;<a class=\"reference-link\" href=\"#root/_help_QxEyIjRBizuC\">Code blocks</a>, type <code>```</code>.</li><li>For a <a href=\"#root/_help_dEHYtoWWi8ct\">horizontal line</a>, type <code>---</code>.</li><li>For <a href=\"#root/_help_NwBbFdNZ9h7O\">admonitions</a>:<ul><li><code>!!! note</code></li><li><code>!!! tip</code></li><li><code>!!! important</code></li><li><code>!!! caution</code></li><li><code>!!! warning</code></li><li>Starting any other text with <code>!!!</code> will insert a note admonition with the text inside of it.</li></ul></li><li>For <a href=\"#root/_help_CohkqWQC1iBv\">emojis</a>, type <code>:</code> followed by an emoji name to trigger an auto-completion.</li></ul><p>If auto-formatting is not desirable, press <kbd>Ctrl</kbd> + <kbd>Z</kbd> to revert the text to its original form.</p>",
"_help_YfYAtQBcfo5V": "<figure class=\"image image-style-align-right\"><img style=\"aspect-ratio:350/193;\" src=\"{{helpAssets}}/User%20Guide/Note%20Types/Text/Math%20Equations_image.png\" width=\"350\" height=\"193\"></figure><p>Within text notes, it's possible to enter mathematical equations using the&nbsp;<span class=\"tn-icon cke cke-trilium-math\"></span> button from the&nbsp;<a class=\"reference-link\" href=\"#root/_help_nRhnJkTT8cPs\">Formatting toolbar</a>&nbsp;(generally found under the&nbsp;<a class=\"reference-link\" href=\"#root/_help_CohkqWQC1iBv\">Insert buttons</a>).</p><p>By default, the math dialog includes a MathLive visual editor and a TeX field. Disable <em>MathLive visual editor</em> under Options → Text Notes → Features to use only the TeX field and preview.</p><p>Enabling <em>Display mode</em> will render the equation slightly bigger (especially if using big operators such as summation, or fractions) and center it. Display mode equations will act as blocks (i.e. like paragraphs, or tables) and can be inserted for example in lists. Non-display equations can be part of the text.</p><h2>Keyboard shortcuts</h2><p>If inserting equations frequently, using the <kbd>Ctrl</kbd>+<kbd>M</kbd> keyboard shortcut can be more comfortable. Alternatively, type <code>$$</code> or <code>\\[</code> to trigger the popup directly.</p><p>There is currently no quick way to turn an already typed-out equation, such as surrounding it with <code>$</code> or pressing <kbd>Ctrl</kbd>+<kbd>M</kbd>.</p><h2>Supported math features</h2><p>Technically we are using the KaTeX library which allows for a subset of the TeX format. To see the full list of supported features, consult the <a href=\"https://katex.org/docs/supported\">Supported Functions</a> and the <a href=\"https://katex.org/docs/support_table\">Support Table</a> from the official documentation.</p><h2>Markdown support</h2><p>Math equations will be preserved when exporting to or importing from Markdown, surrounded by <code>$</code> characters for inline math expressions, and <code>$$</code> for display mode.</p><p>If you notice any issue with the Markdown import/export for equations, feel free to <a href=\"#root/_help_wy8So3yZZlH9\">report</a> it while providing the equation that causes issues.</p><h2>Formatting the equation</h2><p>It is possible to customize the font size and foreground color for both inline and display-mode equations, just like any other text. For inline equations, the background color/highlight can also be adjusted.</p>",
"_help_wYDzQ1fBFgfT": "<p>A multicolumn layout arranges content in two to four columns, side by side. A column can hold any kind of content, including tables, images and another multicolumn layout.</p><h2>Inserting a layout</h2><ul><li>In the formatting bar, go to <em>Insert</em> → <span class=\"tn-icon cke cke-trilium-multicolumn\"></span> <em>Columns</em> to insert a layout with two columns. Its submenu offers <em>2 columns</em>, <em>3 columns</em> and <em>4 columns</em>.</li><li>Alternatively, type <code>/columns</code> and choose <em>2 columns layout</em>, <em>3 columns layout</em> or <em>4 columns layout</em>, as described in&nbsp;<a class=\"reference-link\" href=\"#root/_help_ZlN4nump6EbW\">Slash Commands</a>.</li></ul><p>The columns of a new layout have equal widths. If text is selected when the layout is inserted, the selection moves into the first column.</p><h2>Changing the columns</h2><h3>Changing the layout</h3><p>While the cursor is inside a layout, a toolbar appears above it with a button that shows the current layout. Clicking it opens a row of figures, one for each available layout; hovering over a figure shows its number of columns and their widths:</p><figure class=\"table\"><table><thead><tr><th>Columns</th><th>Widths</th></tr></thead><tbody><tr><td>2</td><td>50%-50%, 25%-75%, 75%-25%</td></tr><tr><td>3</td><td>33%-33%-33%, 25%-50%-25%</td></tr><tr><td>4</td><td>25%-25%-25%-25%</td></tr></tbody></table></figure><ul><li>Choosing a layout with more columns adds empty columns at the end.</li><li>Choosing a layout with fewer columns removes the last columns and moves their content to the end of the last remaining column.</li></ul><h3>Adding columns</h3><p>While the cursor is in a column, you can use these key combinations:</p><ul><li><kbd>Ctrl</kbd> + <kbd>Enter</kbd>: Add a column after the current one.</li><li><kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Enter</kbd>: Add a column before the current one.</li></ul><p>The new column is empty and the cursor moves into it. All the columns then have equal widths. A layout has at most four columns, so the keys do nothing in a layout that already has four.</p><p><kbd>Ctrl</kbd> + <kbd>Enter</kbd> keeps its usual function on a link, in a to-do item and in the title of a collapsible block, and <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Enter</kbd> in a to-do item.</p><h3>Reordering columns</h3><p>While the cursor is anywhere inside a column, you can use these key combinations:</p><ul><li><kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>Right</kbd>: Move the column to the right.</li><li><kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>Left</kbd>: Move the column to the left.</li><li><kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>Home</kbd>: Make it the first column.</li><li><kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>End</kbd>: Make it the last column.</li></ul><p>In a layout with two columns of different widths, the column keeps its width.</p><h2>Moving content between columns</h2><p>To move content to another column, select it, and then use these key combinations:</p><ul><li><kbd>Ctrl</kbd> + <kbd>Right</kbd>: Move to the column on the right.</li><li><kbd>Ctrl</kbd> + <kbd>Left</kbd>: Move to the column on the left.</li><li><kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>End</kbd>: Move to the last column.</li><li><kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Home</kbd>: Move to the first column.</li></ul><p>Paragraphs, list items, tables and other blocks move whole, even when only part of them is selected. Content moved to a column on the left goes to the end of that column, and content moved to a column on the right goes to its start, so it keeps its place in the reading order.</p><p>Without a selection, these keys keep their usual function: moving the cursor by word, or selecting up to the start or end of the column.</p><p>When a layout and <a class=\"reference-link\" href=\"#root/_help_EK2ckIZ74tbT\">Content tabs</a> are nested in one another, the key combinations act on the one closest to the cursor.</p><h2>Removing a layout</h2><ul><li>To remove the layout but keep its content, click the <span class=\"tn-icon cke cke-remove\"></span> <em>Remove layout</em> button in the layout's toolbar. The content of the columns is placed one after another where the layout was, and empty columns are left out.</li><li>To delete the layout together with its content, click the handle at its top-left corner to select it, then press <kbd>Delete</kbd>.</li></ul><h2>Narrow screens</h2><p>When a layout has too little room for its columns (narrower than about 500 pixels, such as on a phone), the columns are stacked one below the other. While editing, alternating background colors tell the columns apart. This applies to each layout on its own, so a layout inside a narrow column is stacked while the outer one stays side by side.</p><h2>Printing and exporting</h2><ul><li>When printing or <a href=\"#root/_help_NRnIZmSMc5sj\">exporting to PDF</a>, the columns are printed side by side.</li><li>Markdown has no columns, so Markdown export keeps the layout and each column as HTML <code>&lt;div&gt;</code> tags, with the content of each column written as Markdown between them. Importing the file back restores the layout. Markdown viewers that don't support HTML show the content of the columns one after another.</li></ul>",
@@ -152,7 +152,7 @@
"_help_ZlN4nump6EbW": "<figure class=\"image image-style-align-right\"><img style=\"aspect-ratio:419/571;\" src=\"{{helpAssets}}/User%20Guide/Note%20Types/Text/Slash%20Commands_image.png\" width=\"419\" height=\"571\"></figure><p>Slash commands is a feature of&nbsp;<a class=\"reference-link\" href=\"#root/_help_iPIMuisry3hd\">Text</a>&nbsp;notes which allows easily accessing commonly used commands simply by using the keyboard, without having to remember dedicated&nbsp;<a class=\"reference-link\" href=\"#root/_help_A9Oc6YKKc65v\">Keyboard Shortcuts</a>.</p><h2>Interaction</h2><ul><li>As the name suggests, to trigger the slash commands simply press the / key to trigger it. Note that this can be anywhere in a paragraph as long as it's not part of the word, if it doesn't show up simply press a space and press the / key again.</li><li>Use ↑ and ↓ keys to navigate between options.</li><li>By default, the full list of commands is displayed.</li><li>To search, simply start typing: commands are found by their title or by other names they go by (for example <code>h2</code> for <em>Heading 2</em>).</li><li>To trigger the highlighted action, press Enter or Tab.</li></ul><h2>Integration with other features</h2><p>Apart from the common set of commands, some features are specially integrated with the slash commands:</p><ul><li>For <a href=\"#root/_help_NwBbFdNZ9h7O\">admonitions</a>, each admonition type (e.g. note, tip) will be individually displayed.</li><li>Every&nbsp;<a class=\"reference-link\" href=\"#root/_help_pwc194wlRzcH\">Text Snippets</a>&nbsp;will also appear individually, making it easy to insert them.</li><li><a class=\"reference-link\" href=\"#root/_help_VRoP0g1uHHc2\">In-editor AI assistant</a>: dedicated <em>Ask AI</em> item as well as all the predefined and <a href=\"#root/_help_mVEYwt20exhO\">custom quick actions</a>.</li></ul>",
"_help_oBo3iHIZnbG2": "<p>Trilium supports spell checking for your notes. How it works depends on whether you're using the <strong>desktop application</strong> (Electron) or accessing Trilium through a <strong>web browser</strong>.</p><h2>Desktop</h2><p>The desktop app uses Chromium's built-in spellchecker. You can configure it from <em>Options</em> → <em>Spell Check</em>.</p><h3>Enabling spell check</h3><p>Toggle <em>Check spelling</em> to enable or disable the spellchecker. A restart is required for changes to take effect — use the restart button at the bottom of the section.</p><h3>Choosing languages</h3><p>When spell check is enabled, a <em>Spell Check Languages</em> section appears listing all languages available on your system. Select one or more languages by checking the boxes. The spellchecker will accept words that are valid in <em>any</em> of the selected languages.</p><p>The available languages depend on your operating system's installed language packs. For example, on Windows you can add languages through <em>Options</em> → <em>Time &amp; Language</em> → <em>Language &amp; Region</em> → <em>Add a language</em>.</p><aside class=\"admonition note\"><p>The changes take effect only after restarting the application.</p></aside><h3>Custom dictionary</h3><aside class=\"admonition tip\"><p>This function is available starting with Trilium v0.103.0.</p></aside><p>Words you add to the dictionary (e.g. via the right-click context menu → \"Add to dictionary\") are stored in a <strong>synced note</strong> inside Trilium. This means your custom dictionary automatically syncs across all your devices.</p><p>You can view and edit the dictionary directly from <em>Settings</em> → <em>Spell Check</em> → <em>Custom Dictionary</em> → <em>Edit dictionary</em>. This opens the underlying note, which contains one word per line. You can add, remove, or modify entries as you like.</p><aside class=\"admonition note\"><p>Changes to the custom dictionary (whether from the editor or the context menu) take effect after restarting the application.</p></aside><h4>How the custom dictionary works</h4><ul><li>When you right-click a misspelled word and choose \"Add to dictionary\", the word is saved both to Electron's local spellchecker and to the synced dictionary note.</li><li>On startup, Trilium loads all words from the dictionary note into the spellchecker session.</li><li>If Trilium detects words in Electron's local dictionary but the dictionary note is empty (e.g. on first use), it performs a <strong>one-time import</strong> of those words into the note.</li><li>Words that are in Electron's local dictionary but <em>not</em> in the note (e.g. you removed them manually) are cleaned up from the local dictionary on startup.</li></ul><h4>Known limitations</h4><p>On Windows and macOS, Electron delegates \"Add to dictionary\" to the operating system's user dictionary. This means:</p><ul><li>Words added via the context menu are also written to the OS-level dictionary (e.g. <code>%APPDATA%\\Microsoft\\Spelling\\&lt;language&gt;\\default.dic</code> on Windows).</li><li><strong>Removing a word</strong> from the Trilium dictionary note prevents it from being loaded into the spellchecker on next startup, but does <em>not</em> remove it from the OS dictionary. The word may still be accepted by the OS spellchecker until you remove it from the OS dictionary manually.</li></ul><h2>Web browser</h2><p>When accessing Trilium through a web browser, spell checking is handled entirely by the browser itself. Trilium does not control the browser's spellchecker — language selection, dictionaries, and all other settings are managed through your browser's preferences.</p><p>The&nbsp;<a class=\"reference-link\" href=\"#root/_help_jcQVxzYybYgz\">Note contextual menu</a>&nbsp;has a special behavior in which a right-clicked word (without selection) shows the browser's default contextual menu which allows the spellcheck to function.</p><p>The Spell Check settings page in Trilium will indicate that these options apply only to desktop builds.</p><h2>Frequently asked questions</h2><h3>Do I need to restart after every change?</h3><p>Yes. Spell check language selection and the custom dictionary are loaded once at startup. Any changes require a restart to take effect.</p><h3>Can I use multiple spell check languages at the same time?</h3><p>Yes. Select as many languages as you need from the checklist. The spellchecker will accept words from any of the selected languages.</p><h3>My custom words disappeared after syncing to a new device — what happened?</h3><p>On the first launch of a new device, Trilium may import existing local dictionary words into the note. If the note already has words from another device (via sync), those are preserved. Make sure sync completes before restarting the application on a new device.</p><h3>I removed a word from the dictionary note but it's still accepted</h3><p>This is likely due to the OS-level dictionary retaining the word (see <a href=\"#known-limitations\">Known limitations</a> above). You can manually remove it from your operating system's user dictionary.</p>",
"_help_BFvAtE74rbP6": "<aside class=\"admonition note\"><p>This page has been relocated to&nbsp;<a class=\"reference-link\" href=\"#root/_help_2dcGDhp9WFKb\">Outline tab</a>.</p></aside>",
- "_help_NdowYOC1GFKS": "<p>Tables are a powerful feature for&nbsp;<a class=\"reference-link\" href=\"#root/_help_iPIMuisry3hd\">Text</a>&nbsp;notes, since editing them is generally easy.</p><figure class=\"image image-style-align-right\"><img style=\"aspect-ratio:176/204;\" src=\"{{helpAssets}}/User%20Guide/Note%20Types/Text/2_Tables_image.png\" width=\"176\" height=\"204\"></figure><p>To create a table, simply press the table button and select with the mouse the desired amount of columns and rows, as indicated in the adjacent figure.</p><p>Since v0.107.0, the same menu starts with an <em>Insert table…</em> item, for a table larger than the grid or to type its size instead:</p><ol><li>Click the <span class=\"tn-icon cke cke-table\"></span>button and select <em>Insert table…</em>. A small form opens at the cursor.</li><li>Enter the number of <em>Columns</em> (up to 100) and <em>Rows</em> (up to 1000). The table can have at most 5000 cells in total, for example 1000 rows of 5 columns.</li><li>Press <em>Insert</em> or <kbd>Enter</kbd>.</li></ol><p>To close the form without inserting a table, press <kbd>Esc</kbd> or click outside it. From the keyboard, <kbd>Tab</kbd> moves between <em>Insert table…</em> and the grid while the menu is open.</p><p>On the <a class=\"reference-link\" href=\"#root/_help_RDslemsQ6gCp\">Mobile Frontend</a>, the table is inserted from the <span class=\"tn-icon cke cke-plus\"></span> button of the formatting toolbar: its <em>Insert table</em> tile lists common sizes, from 2 × 2 to 3 × 4 (rows × columns). Tap one to insert a table of that size; to make it larger, insert rows and columns afterwards.</p><h2>Formatting toolbar</h2><p>When a table is selected, a special formatting toolbar will appear:</p><img src=\"{{helpAssets}}/User%20Guide/Note%20Types/Text/3_Tables_image.png\" width=\"384\" height=\"100\"><p>On the <a class=\"reference-link\" href=\"#root/_help_RDslemsQ6gCp\">Mobile Frontend</a>, the toolbar does not float over the table. Instead, press the <span class=\"tn-icon cke cke-table\"></span> button after <em>Undo</em> and <em>Redo</em> in the formatting toolbar at the bottom of the screen to show the table's toolbar there.</p><h2>Context menu</h2><p>Since v0.106.0, right-clicking anywhere inside a table opens a context menu with the most common table operations:</p><ul><li><em>Insert row above</em> and <em>Insert row below</em> insert a blank row next to the row of the current cell. When the selection spans multiple rows, the same number of rows is inserted.</li><li><em>Insert column to the left</em> and <em>Insert column to the right</em> work the same way for columns.</li><li>Since v0.107.0, <em>Set as header</em> or <em>Set header up to this row</em>, depending on the selection, turns rows into header rows, which always start at the top of the table:<ul><li><em>Set as header</em> shows when the selection starts at the first row, and makes every selected row a header row.</li><li><em>Set header up to this row</em> shows when the selection is in a single row below the first, and makes that row and every row above it header rows.</li><li>Neither shows when the selection spans several rows below the first.</li><li>A check mark shows that the rows are already header rows. Choosing the item again turns them, and every header row below them, back into regular rows. For example, in a table with five header rows, choosing <em>Set header up to this row</em> on the third row leaves only the first two as header rows.</li></ul></li><li><em>Merge cells</em> merges the selected cells into one. The selected cells must form a rectangle.</li><li><em>Split cell</em> splits each selected cell in two, either <em>Vertically</em> or <em>Horizontally</em>. <em>Unmerge cells</em>, in the same submenu, turns each merged cell in the selection back into the single cells it covers, keeping its content in the top-left one; cells that are not merged stay as they are.</li><li><em>Distribute columns evenly</em> splits the combined width of the columns the selection touches equally between them. The other columns and the width of the table stay as they are. It needs a selection spanning at least two columns; a merged cell counts for every column it covers.</li><li><em>Cut</em>, <em>Copy</em> and <em>Copy as Markdown</em> act on the selected cells. Since v0.107.0, <em>Copy</em> and <em>Paste</em> open submenus with their variants, such as <em>Copy as Markdown</em> and <em>Paste as plain text</em>; clicking <em>Copy</em> or <em>Paste</em> itself still copies or pastes:<ul><li>Cutting or copying produces a smaller table holding just the selected cells. Pasting it over a cell selection replaces those cells; pasting elsewhere inserts it as a table of its own. Cutting clears the cells without removing rows or columns.</li><li><em>Copy as Markdown</em> converts the selected cells to a Markdown table. A selected header row becomes the Markdown header; without one, an empty header row is emitted, since Markdown tables require one.</li></ul></li><li>Since v0.107.0, <em>Paste rows above</em> and <em>Paste rows below</em>, in the <em>Paste</em> submenu, paste the clipboard as new rows next to the row of the current cell, instead of over the cells from the cursor on. They show only when the selection is in a single row, and, like <em>Paste</em>, only where the clipboard can be read:<ul><li>A copied table becomes one new row for each of its rows, filled from the first column. When it has more columns than the table, the table gains columns, as with a regular paste. Other content goes in the first cell of a single new row.</li><li>The new rows are selected afterwards.</li><li>When merged cells join the row to others, the new rows go above or below that whole block of rows.</li></ul></li><li><em>Sort</em>, below the clipboard section, sorts the rows by the column of the current cell, in <em>Ascending</em> or <em>Descending</em> order. See <a href=\"#sorting-rows\">Sorting rows</a>.</li><li><em>Delete row</em> and <em>Delete column</em>, below <em>Sort</em>, remove every row or column the selection touches, even when only some of their cells are selected.</li><li><em>Delete table</em> removes the whole table and leaves an empty paragraph in its place. In a table nested inside another, only the inner table is removed.</li><li>Since v0.107.0, <em>Select</em>, below <em>Delete table</em>, selects the cells of every row (<em>Row</em>) or column (<em>Column</em>) the selection touches, or every cell of the table (<em>Table</em>). Unlike the <span class=\"tn-icon cke cke-drag-handle\"></span>button, which selects the table as a whole, <em>Table</em> selects its cells, so cell operations such as <em>Merge cells</em> apply to all of them. In a table nested inside another, <em>Table</em> selects only the cells of the inner table.</li></ul><p>Right-clicking a cell that is not part of the current selection moves the cursor there first, so the menu always applies to the cell under the pointer.</p><aside class=\"admonition note\"><p>In the browser, Trilium's menu replaces the browser's own context menu inside tables. To reach the browser's menu (for example for its spell checking suggestions), hold <kbd>Shift</kbd> while right-clicking. The desktop application is unaffected, since its menu already includes the spelling suggestions. In the browser, the menu also offers <em>Paste</em> only when the page can read the clipboard, which requires a secure (HTTPS) context and your permission; otherwise, paste with <kbd>Ctrl</kbd>+<kbd>V</kbd>.</p></aside><h2>Navigating a table</h2><ul><li>Using the mouse:<ul><li>Click on a cell to focus it.</li><li>Click the&nbsp;<span class=\"tn-icon cke cke-return-arrow\"></span> button at the top or the bottom of a table to insert an empty paragraph near it.</li><li>Click the&nbsp;<span style=\"--tn-color:hsl(0,0%,60%);color:hsl(0,0%,60%);\"><span class=\"tn-icon cke cke-drag-handle\"></span></span> button at the top-left of the table to select it entirely (for easy copy-pasting or cutting) or drag and drop it to relocate the table.</li></ul></li><li>Using the keyboard:<ul><li>Use the arrow keys on the keyboard to easily navigate between cells.</li><li>It's also possible to use <kbd>Tab</kbd> to go to the next cell and Shift+Tab to go to the previous cell.</li><li>Unlike arrow keys, pressing <kbd>Tab</kbd> at the end of the table (last row, last column) will create a new row automatically.</li><li>To select multiple cells, hold <kbd>Shift</kbd> while using the arrow keys.</li></ul></li><li>Using touch:<ul><li>Since v0.107.0, touching a table outlines the cell with the cursor, or the selected cells, and shows a handle at each corner of the outline.</li><li>To select multiple cells, drag one of the handles across the table. The cell at the opposite corner stays selected, so the selection grows or shrinks as the finger moves. The note and wide tables scroll when the handle reaches the edge of the screen.</li></ul></li></ul><h2>Resizing cells</h2><ul><li>Columns can be resized by hovering the mouse over the border of two adjacent cells and dragging it.</li><li>To give several columns the same width, select cells across them and choose <em>Distribute columns evenly</em> from the <span class=\"tn-icon cke cke-table-column\"></span>button of the formatting toolbar or from the <a href=\"#context-menu\">context menu</a>.</li><li>By default, the row height is not adjustable using the mouse, but it can be configured from the cell settings (see below).</li><li>To adjust exactly the width (in pixels or percentages) of a cell, select the&nbsp;<span class=\"tn-icon cke cke-table-cell-properties\"></span> button.</li></ul><h3>Resizing with touch</h3><p>Since v0.107.0, touching a table shows a bar at the bottom of the note, above the formatting toolbar on mobile. The bar has a segment for each column of the table, with a divider at the end of each column. Only the divider of the column with the cursor is a handle that resizes; the other dividers only mark where the columns meet, so a swipe across them scrolls instead. When several cells are selected, each column they cover has a handle.</p><ul><li>To resize a column, place the cursor in one of its cells or tap its segment, then drag its handle. The table grows or shrinks with the column, and scrolls when the handle reaches the edge of the screen. The column snaps to its starting width and to the widths of the columns beside it.</li><li>To cancel a resize, drag the handle back to where it started, or touch the screen with a second finger.</li><li>To give a column and the next one the same width, double-tap the handle between them.</li><li>To select a column, tap its segment. To open the column menu, touch and hold the segment.</li><li>To scroll a wide table sideways, swipe along the bar.</li></ul><p>A wide table scrolls a little past its end, so the handle of its last column stays away from the edge of the screen, where a swipe navigates back.</p><h2>Wide tables</h2><p>Since v0.107.0, a table can be wider than the&nbsp;<a class=\"reference-link\" href=\"#root/_help_t596jLvPrqkS\">Content width</a>. Such a table scrolls sideways, while the rest of the note keeps its width.</p><ul><li>A new table is as wide as the content. To make it wider, drag the right border of its last column past the edge of the content. The border snaps to the edge and holds there briefly, so the table is easy to bring back to the width of the content.</li><li>To set an exact width, enter a percentage above <code>100%</code> or a width in pixels in the&nbsp;<span class=\"tn-icon cke cke-table-properties\"></span> <a href=\"#table-properties\">table properties</a>.</li><li>A table whose content needs more room than the note, such as a pasted table with many columns, also scrolls instead of stretching the note.</li><li>Wide tables scroll the same way in read-only notes and on shared pages.</li><li>When printing or exporting to PDF, a wide table is shrunk to fit the page.</li></ul><p>Tables inside other blocks, such as block quotes, admonitions, collapsible blocks, columns or tabs, are limited to the width of their block and do not scroll.</p><h3>Mobile support</h3><p>On the&nbsp;<a class=\"reference-link\" href=\"#root/_help_RDslemsQ6gCp\">Mobile Frontend</a>, a table keeps the width it has on a desktop and scrolls sideways, instead of squeezing its columns into the width of the screen. The full width of a table is the <em>Max content width</em> set in&nbsp;<a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Appearance</em> → <em>Content Width</em> on the mobile device, 1200 pixels by default. For example, a table set to <code>50%</code> is 600 pixels wide.</p><p>To resize columns on mobile, use the bar described in <a href=\"#resizing-with-touch\">Resizing with touch</a>.</p><h2>Long tables</h2><p>Since v0.107.0, the header rows of a table stay visible at the top of the note while you scroll through the rest of the table, and leave with the end of the table. This also works in read-only notes, on shared pages and in wide tables.</p><p>To turn rows into header rows, use <em>Set as header</em> in the <a href=\"#context-menu\">context menu</a>, or <em>Header row</em> in the <span class=\"tn-icon cke cke-table-row\"></span> button of the formatting toolbar.</p><p>To let header rows scroll away with the rest of the table, turn off <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Text Notes</em> → <em>Features</em> → <em>Use sticky header rows for tables</em>. The setting applies to the current device only, and shared pages keep their sticky header rows.</p><h2>Inserting new rows and new columns</h2><ul><li>To insert a new column, click on a desired location, then press the&nbsp;<span class=\"tn-icon cke cke-table-column\"></span> button from the formatting toolbar and select <em>Insert column left or right.</em></li><li>To insert a new row, click on a desired location, then press the&nbsp;<span class=\"tn-icon cke cke-table-row\"></span> button and select <em>Insert row above</em> or <em>below</em>.<ul><li>A quicker alternative to creating a new row while at the end of the table is to press the <kbd>Tab</kbd> key.</li></ul></li><li>Both operations are also available in the <a href=\"#context-menu\">context menu</a>, which inserts as many rows or columns as the selection spans.</li></ul><h2>Moving rows and columns</h2><p>Since v0.106.0, rows and columns can be reordered with the keyboard:</p><ul><li><kbd>Alt</kbd>+<kbd>Up</kbd> and <kbd>Alt</kbd>+<kbd>Down</kbd> move the rows touched by the selection up or down.</li><li><kbd>Alt</kbd>+<kbd>Left</kbd> and <kbd>Alt</kbd>+<kbd>Right</kbd> move the columns touched by the selection left or right.</li></ul><p>Merged cells are never split by a move. The rows or columns held together by a merged cell travel as one block, and moving toward such a block jumps over it entirely.</p><p>When the table has a header row, a header row moved below the header area becomes a regular row, and a regular row moved into the header area becomes a header row. Header columns behave the same way.</p><p>Outside of tables, <kbd>Alt</kbd>+<kbd>Left</kbd> and <kbd>Alt</kbd>+<kbd>Right</kbd> keep navigating the note history, and <kbd>Alt</kbd>+<kbd>Up</kbd> and <kbd>Alt</kbd>+<kbd>Down</kbd> keep moving the current paragraph.</p><h2>Sorting rows</h2><p>Since v0.107.0, the rows of a table can be sorted by the values of one column:</p><ul><li>To sort all the rows, place the cursor in any cell of the column to sort by, then select <em>Sort</em> → <em>Ascending</em> or <em>Descending</em> from the <a href=\"#context-menu\">context menu</a>. The same items are in the <span class=\"tn-icon bx bx-sort-alt-2\"></span>button of the formatting toolbar.</li><li>To sort only some of the rows, select their cells in the column to sort by, then sort the same way. Sorting is not available while the selection spans more than one column.</li></ul><p>Header rows always stay at the top of the table and are never sorted. A sort can be undone with <kbd>Ctrl</kbd>+<kbd>Z</kbd>.</p><h3>How values are compared</h3><p>Each cell is read as plain text, so formatting does not affect the order. Trilium then detects what kind of value the cell holds:</p><figure class=\"table\"><table><thead><tr><th>Kind</th><th>Examples</th><th>Compared by</th></tr></thead><tbody><tr><td>Time</td><td><code>15:02</code>, <code>15:02:38</code>, <code>3:02 PM</code></td><td>The time of day.</td></tr><tr><td>Date</td><td><code>2026-09-30</code>, <code>2026-09-30 15:02</code>, <code>30 September 2026</code>, <code>Wednesday, 30 September 2026</code>, <code>2026-09-30T15:02:38+03:00</code></td><td>The date and time.</td></tr><tr><td>Number</td><td><code>12</code>, <code>-3.5</code>, <code>1,234.56</code>, <code>$ 12.04</code>, <code>21 RON</code>, <code>24.5m</code></td><td>The numeric value.</td></tr><tr><td>Text</td><td>Anything else.</td><td>Alphabetically, ignoring case, with numbers inside the text in numeric order (<code>Item 9</code> before <code>Item 10</code>). Accents count, so <code>a</code> and <code>á</code> differ.</td></tr><tr><td>Empty</td><td>An empty cell, or one holding only spaces.</td><td>Not compared. Empty cells always go last.</td></tr></tbody></table></figure><p>Ascending order puts times first, then dates, numbers and text. Descending order reverses it. Empty cells go last in both directions.</p><p>Numbers, dates and times with the same value are ordered by their text, so <code>5 apples</code> comes before <code>5 pears</code>. Rows whose cells hold the same text, ignoring case, keep their relative order.</p><ul><li>Dates are also recognized in the formats of the note's language, such as <code>30.09.2026</code> or <code>30. September 2026</code> for German, and in the format chosen in&nbsp;<a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a>&nbsp;→ <em>Text Notes</em> → <em>Editor</em> → <em>Date/time format</em> for <a href=\"#root/_help_CohkqWQC1iBv\">inserting the date and time</a>.</li><li>A number can start with a currency symbol, such as <code>$</code>, <code>€</code> or <code>£</code>. Whatever follows the number, such as a unit, is ignored, so units are not converted: <code>1 km</code> sorts before <code>500 m</code>. A cell that starts with letters, such as <code>RON 21</code>, is text.</li><li>The decimal separator follows the language of the note: <code>1.500</code> is one and a half in English, but one thousand five hundred in German. A comma or period that is not followed by exactly three digits is always read as a decimal separator, so <code>1,5</code> is one and a half in either language.</li><li>The language of the note set in the&nbsp;<a class=\"reference-link\" href=\"#root/_help_AlJ73vBCjWDw\">Status bar</a>&nbsp;via the&nbsp;<span class=\"tn-icon bx bx-globe\"></span> icon, or else the default content language. See&nbsp;<a class=\"reference-link\" href=\"#root/_help_veGu4faJErEM\">Content language &amp; Right-to-left support</a>.</li></ul><h3>Merged cells</h3><p>Rows joined by a merged cell are kept together and move as one block. The block is sorted by the value in its first row. When the block has more than one cell in the sorted column, the other cells do not affect the order, and a message says so: <em>Some rows were sorted together because merged cells tie them to each other</em>.</p><p>When the selection covers only part of such a block, the whole block is sorted.</p><h2>Merging cells</h2><p>To merge two or more cells together, simply select them via drag &amp; drop and press the&nbsp;<span class=\"tn-icon cke cke-table-merge-cell\"></span> button from the formatting toolbar.</p><p>More options are available by pressing the arrow next to it:</p><ul><li>Click on a single cell and select Merge cell up/down/right/left to merge with an adjacent cell.</li><li>Select <em>Merge selected cells</em> to merge the selected cells, the same as pressing the button itself.</li><li>Select <em>Split cell vertically</em> or <em>horizontally</em>, to split a cell into multiple cells (can also be used to undo a merge).</li><li>Select <em>Unmerge cells</em> to turn each merged cell in the selection back into the single cells it covers, keeping its content in the top-left one.</li></ul><p><em>Merge selected cells</em> and <em>Unmerge cells</em> are available since v0.107.0. Merging and splitting are also available by right-clicking the selected cells, via the <a href=\"#context-menu\">context menu</a>, where <em>Unmerge cells</em> is in the <em>Split cell</em> submenu.</p><h2>Table properties</h2><figure class=\"image image-style-align-right\"><img style=\"aspect-ratio:312/311;\" src=\"{{helpAssets}}/User%20Guide/Note%20Types/Text/Tables_image.png\" width=\"312\" height=\"311\"></figure><p>The table properties can be accessed via the&nbsp;<span class=\"tn-icon cke cke-table-properties\"></span> button and allows for the following adjustments:</p><ul><li>Border (not the border of the cells, but the outer rim of the table), which includes the style (single, double), color and width.</li><li>The background color, with none set by default.</li><li>The width and height of the table in percentage (must end with <code>%</code>) or pixels (must end with <code>px</code>).</li><li>The alignment of the table.<ul><li>Left or right-aligned, case in which the text will flow next to it.</li><li>Centered, case in which text will avoid the table, regardless of the table width.</li></ul></li></ul><p>The table will immediately update to reflect the changes, but the <em>Save</em> button must be pressed for the changes to persist.</p><h2>Cell properties</h2><figure class=\"image image-style-align-right\"><img style=\"aspect-ratio:320/386;\" src=\"{{helpAssets}}/User%20Guide/Note%20Types/Text/1_Tables_image.png\" width=\"320\" height=\"386\"></figure><p>Similarly to table properties, the&nbsp;<span class=\"tn-icon cke cke-table-cell-properties\"></span> button opens a popup which adjusts the styling of one or more cells (based on the user's selection).</p><p>The following options can be adjusted:</p><ul><li>The border style, color and width (same as table properties), but applying to the current cell only.</li><li>The background color, with none set by default.</li><li>The width and height of the cell in percentage (must end with <code>%</code>) or pixels (must end with <code>px</code>).</li><li>The padding (the distance of the text compared to the cell's borders).</li><li>The alignment of the text, both horizontally (left, centered, right, justified) and vertically (top, middle or bottom).</li></ul><p>The cell will immediately update to reflect the changes, but the <em>Save</em> button must be pressed for the changes to persist.</p><h2>Border and background colors</h2><p>The border and background colors of tables and cells adapt to the <a href=\"#root/_help_Wy267RK4M69c\">theme</a>, the same way as <a href=\"#root/_help_Gr6xFaF6ioJ5\">text colors</a> do. A color picked from the palette, chosen with the color picker or typed in is shown in a lighter or darker shade that suits the current theme, so borders stay visible and text stays readable on the background. The hue stays the same, and the table keeps the color as it was picked.</p><p>Colors applied with older versions of Trilium are shown exactly as they were picked, until the note is next edited.</p><p>Older browsers that can't adapt colors show them exactly as they were picked.</p><h2>Caption</h2><p>Press the&nbsp;<span class=\"tn-icon cke cke-caption\"></span> button to insert a caption or a text description of the table, which is going to be displayed above the table.</p><h2>Table borders</h2><p>By default, tables come with a gray border that is lighter or darker to suit the current <a href=\"#root/_help_Wy267RK4M69c\">theme</a>, so it stays discreet on a dark background.</p><p>To change the default border of every table, set the <code>--text-note-table-border-color</code> variable in a <a href=\"#root/_help_7NfNr5pZpVKV\">custom theme</a> or in <a href=\"#root/_help_AlhDUqhENtH7\">custom app-wide CSS</a>, for example <code>:root { --text-note-table-border-color: #555; }</code>. Set it to <code>transparent</code> to hide the borders of all the tables that don't have a border of their own.</p><p>To adjust the borders, follow these steps:</p><ol><li>Select the table.</li><li>In the floating panel, select the <em>Table properties</em> option (<span class=\"tn-icon cke cke-table-properties\"></span>).<ol><li>Look for the <em>Border</em> section at the top of the newly opened panel.</li><li>This will control the outer borders of the table.</li><li>Select a style for the border. Generally <em>Single</em> is the desirable option.</li><li>Select a color for the border.</li><li>Select a width for the border, expressed in pixels.</li></ol></li><li>Select all the cells of the table and then press the <em>Cell properties</em> option (<span class=\"tn-icon cke cke-table-cell-properties\"></span>).<ol><li>This will control the inner borders of the table, at cell level.</li><li>Note that it's possible to change the borders individually by selecting one or more cells, case in which it will only change the borders that intersect these cells.</li><li>Repeat the same steps as from step (2).</li></ol></li></ol><h3>Tables with invisible borders</h3><p>Tables can be set to have invisible borders in order to allow for basic layouts (columns, grids) of text or <a href=\"#root/_help_mT0HEkOsz6i1\">images</a> without the distraction of their border:</p><ol><li>First insert a table with the desired number of columns and rows.</li><li>Select the entire table.</li><li>In <em>Table properties</em>, set:<ol><li><em>Style</em> to <em>Single</em></li><li><em>Color</em> to <code>transparent</code></li><li>Width to <code>1px</code>.</li></ol></li><li>In Cell Properties, set the same as on the previous step.</li></ol><h2>Table indentation</h2><p>Since v0.104.1, tables can be indented as a block (the whole table moves, rather than just the content of a cell).</p><ol><li>Click the&nbsp;<span style=\"--tn-color:hsl(0,0%,60%);color:hsl(0,0%,60%);\"><span class=\"tn-icon cke cke-drag-handle\"></span></span> button to select the entire table. Otherwise, the indentation applies only to the current cell's content.</li><li>Press <kbd>Tab</kbd> to increase the indent, or <kbd>Shift</kbd>+<kbd>Tab</kbd> to decrease it. Alternatively, use the indentation buttons in the formatting toolbar.</li></ol><p>Markdown does not support indented tables, so the indentation is lost when converting to Markdown.</p><h2>Markdown import/export</h2><p>Simple tables are exported in GitHub-flavored Markdown format (e.g. a series of <code>|</code> items). If the table is found to be more complex (it contains HTML elements, has custom sizes or images), the table is converted to a HTML one instead.</p><p>Generally formatting loss should be minimal when exported to Markdown due to the fallback to HTML formatting.</p>",
+ "_help_NdowYOC1GFKS": "<p>Tables are a powerful feature for&nbsp;<a class=\"reference-link\" href=\"#root/_help_iPIMuisry3hd\">Text</a>&nbsp;notes, since editing them is generally easy.</p><figure class=\"image image-style-align-right\"><img style=\"aspect-ratio:176/204;\" src=\"{{helpAssets}}/User%20Guide/Note%20Types/Text/2_Tables_image.png\" width=\"176\" height=\"204\"></figure><p>To create a table, simply press the table button and select with the mouse the desired amount of columns and rows, as indicated in the adjacent figure.</p><p>Since v0.107.0, the same menu starts with an <em>Insert table…</em> item, for a table larger than the grid or to type its size instead:</p><ol><li>Click the <span class=\"tn-icon cke cke-table\"></span>button and select <em>Insert table…</em>. A small form opens at the cursor.</li><li>Enter the number of <em>Columns</em> (up to 100) and <em>Rows</em> (up to 1000). The table can have at most 5000 cells in total, for example 1000 rows of 5 columns.</li><li>Press <em>Insert</em> or <kbd>Enter</kbd>.</li></ol><p>To close the form without inserting a table, press <kbd>Esc</kbd> or click outside it. From the keyboard, <kbd>Tab</kbd> moves between <em>Insert table…</em> and the grid while the menu is open.</p><p>On the <a class=\"reference-link\" href=\"#root/_help_RDslemsQ6gCp\">Mobile Frontend</a>, the table is inserted from the <span class=\"tn-icon cke cke-plus\"></span> button of the formatting toolbar: its <em>Insert table</em> tile lists common sizes, from 2 × 2 to 3 × 4 (rows × columns). Tap one to insert a table of that size; to make it larger, insert rows and columns afterwards.</p><h2>Formatting toolbar</h2><p>When a table is selected, a special formatting toolbar will appear:</p><img src=\"{{helpAssets}}/User%20Guide/Note%20Types/Text/3_Tables_image.png\" width=\"384\" height=\"100\"><p>On the <a class=\"reference-link\" href=\"#root/_help_RDslemsQ6gCp\">Mobile Frontend</a>, the toolbar does not float over the table. Instead, press the <span class=\"tn-icon cke cke-table\"></span> button after <em>Undo</em> and <em>Redo</em> in the formatting toolbar at the bottom of the screen to show the table's toolbar there.</p><h2>Context menu</h2><p>Since v0.106.0, right-clicking anywhere inside a table opens a context menu with the most common table operations:</p><ul><li><em>Insert row above</em> and <em>Insert row below</em> insert a blank row next to the row of the current cell. When the selection spans multiple rows, the same number of rows is inserted.</li><li><em>Insert column to the left</em> and <em>Insert column to the right</em> work the same way for columns.</li><li>Since v0.107.0, <em>Set as header</em> or <em>Set header up to this row</em>, depending on the selection, turns rows into header rows, which always start at the top of the table:<ul><li><em>Set as header</em> shows when the selection starts at the first row, and makes every selected row a header row.</li><li><em>Set header up to this row</em> shows when the selection is in a single row below the first, and makes that row and every row above it header rows.</li><li>Neither shows when the selection spans several rows below the first.</li><li>A check mark shows that the rows are already header rows. Choosing the item again turns them, and every header row below them, back into regular rows. For example, in a table with five header rows, choosing <em>Set header up to this row</em> on the third row leaves only the first two as header rows.</li></ul></li><li><em>Merge cells</em> merges the selected cells into one. The selected cells must form a rectangle.</li><li><em>Split cell</em> splits each selected cell in two, either <em>Vertically</em> or <em>Horizontally</em>. <em>Unmerge cells</em>, in the same submenu, turns each merged cell in the selection back into the single cells it covers, keeping its content in the top-left one; cells that are not merged stay as they are.</li><li><em>Distribute columns evenly</em> splits the combined width of the columns the selection touches equally between them. The other columns and the width of the table stay as they are. It needs a selection spanning at least two columns; a merged cell counts for every column it covers.</li><li><em>Cut</em>, <em>Copy</em> and <em>Copy as Markdown</em> act on the selected cells. Since v0.107.0, <em>Copy</em> and <em>Paste</em> open submenus with their variants, such as <em>Copy as Markdown</em> and <em>Paste as plain text</em>; clicking <em>Copy</em> or <em>Paste</em> itself still copies or pastes:<ul><li>Cutting or copying produces a smaller table holding just the selected cells. Pasting it over a cell selection replaces those cells; pasting elsewhere inserts it as a table of its own. Cutting clears the cells without removing rows or columns.</li><li><em>Copy as Markdown</em> converts the selected cells to a Markdown table. A selected header row becomes the Markdown header; without one, an empty header row is emitted, since Markdown tables require one.</li></ul></li><li>Since v0.107.0, <em>Paste rows above</em> and <em>Paste rows below</em>, in the <em>Paste</em> submenu, paste the clipboard as new rows next to the row of the current cell, instead of over the cells from the cursor on. They show only when the selection is in a single row, and, like <em>Paste</em>, only where the clipboard can be read:<ul><li>A copied table becomes one new row for each of its rows, filled from the first column. When it has more columns than the table, the table gains columns, as with a regular paste. Other content goes in the first cell of a single new row.</li><li>The new rows are selected afterwards.</li><li>When merged cells join the row to others, the new rows go above or below that whole block of rows.</li></ul></li><li><em>Sort</em>, below the clipboard section, sorts the rows by the column of the current cell, in <em>Ascending</em> or <em>Descending</em> order. See <a href=\"#sorting-rows\">Sorting rows</a>.</li><li><em>Delete row</em> and <em>Delete column</em>, below <em>Sort</em>, remove every row or column the selection touches, even when only some of their cells are selected.</li><li><em>Delete table</em> removes the whole table and leaves an empty paragraph in its place. In a table nested inside another, only the inner table is removed.</li><li>Since v0.107.0, <em>Select</em>, below <em>Delete table</em>, selects the cells of every row (<em>Row</em>) or column (<em>Column</em>) the selection touches, or every cell of the table (<em>Table</em>). Unlike the <span class=\"tn-icon cke cke-drag-handle\"></span>button, which selects the table as a whole, <em>Table</em> selects its cells, so cell operations such as <em>Merge cells</em> apply to all of them. In a table nested inside another, <em>Table</em> selects only the cells of the inner table.</li></ul><p>Right-clicking a cell that is not part of the current selection moves the cursor there first, so the menu always applies to the cell under the pointer.</p><aside class=\"admonition note\"><p>In the browser, Trilium's menu replaces the browser's own context menu inside tables. To reach the browser's menu (for example for its spell checking suggestions), hold <kbd>Shift</kbd> while right-clicking. The desktop application is unaffected, since its menu already includes the spelling suggestions. In the browser, the menu also offers <em>Paste</em> only when the page can read the clipboard, which requires a secure (HTTPS) context and your permission; otherwise, paste with <kbd>Ctrl</kbd>+<kbd>V</kbd>.</p></aside><h2>Navigating a table</h2><ul><li>Using the mouse:<ul><li>Click on a cell to focus it.</li><li>Click the&nbsp;<span class=\"tn-icon cke cke-return-arrow\"></span> button at the top or the bottom of a table to insert an empty paragraph near it.</li><li>Click the&nbsp;<span style=\"--tn-color:hsl(0,0%,60%);color:hsl(0,0%,60%);\"><span class=\"tn-icon cke cke-drag-handle\"></span></span> button at the top-left of the table to select it entirely (for easy copy-pasting or cutting) or drag and drop it to relocate the table.</li></ul></li><li>Using the keyboard:<ul><li>Use the arrow keys on the keyboard to easily navigate between cells.</li><li>It's also possible to use <kbd>Tab</kbd> to go to the next cell and Shift+Tab to go to the previous cell.</li><li>Unlike arrow keys, pressing <kbd>Tab</kbd> at the end of the table (last row, last column) will create a new row automatically.</li><li>To select multiple cells, hold <kbd>Shift</kbd> while using the arrow keys.</li></ul></li><li>Using touch:<ul><li>Since v0.107.0, touching a table outlines the cell with the cursor, or the selected cells, and shows a handle at each corner of the outline.</li><li>To select multiple cells, drag one of the handles across the table. The cell at the opposite corner stays selected, so the selection grows or shrinks as the finger moves. The note and wide tables scroll when the handle reaches the edge of the screen.</li></ul></li></ul><h2>Resizing cells</h2><ul><li>Columns can be resized by hovering the mouse over the border of two adjacent cells and dragging it.</li><li>To give several columns the same width, select cells across them and choose <em>Distribute columns evenly</em> from the <span class=\"tn-icon cke cke-table-column\"></span>button of the formatting toolbar or from the <a href=\"#context-menu\">context menu</a>.</li><li>By default, the row height is not adjustable using the mouse, but it can be configured from the cell settings (see below).</li><li>To adjust exactly the width (in pixels or percentages) of a cell, select the&nbsp;<span class=\"tn-icon cke cke-table-cell-properties\"></span> button.</li></ul><h3>Resizing with touch</h3><p>Since v0.107.0, touching a table shows a bar at the bottom of the note, above the formatting toolbar on mobile. The bar has a segment for each column of the table, with a divider at the end of each column. Only the divider of the column with the cursor is a handle that resizes; the other dividers only mark where the columns meet, so a swipe across them scrolls instead. When several cells are selected, each column they cover has a handle.</p><ul><li>To resize a column, place the cursor in one of its cells or tap its segment, then drag its handle. The table grows or shrinks with the column, and scrolls when the handle reaches the edge of the screen. The column snaps to its starting width and to the widths of the columns beside it.</li><li>To cancel a resize, drag the handle back to where it started, or touch the screen with a second finger.</li><li>To give a column and the next one the same width, double-tap the handle between them.</li><li>To select a column, tap its segment. To open the column menu, touch and hold the segment.</li><li>To scroll a wide table sideways, swipe along the bar.</li></ul><p>A wide table scrolls a little past its end, so the handle of its last column stays away from the edge of the screen, where a swipe navigates back.</p><h2>Wide tables</h2><p>Since v0.107.0, a table can be wider than the&nbsp;<a class=\"reference-link\" href=\"#root/_help_t596jLvPrqkS\">Content width</a>. Such a table scrolls sideways, while the rest of the note keeps its width.</p><ul><li>A new table is as wide as the content. To make it wider, drag the right border of its last column past the edge of the content. The border snaps to the edge and holds there briefly, so the table is easy to bring back to the width of the content.</li><li>To set an exact width, enter a percentage above <code>100%</code> or a width in pixels in the&nbsp;<span class=\"tn-icon cke cke-table-properties\"></span> <a href=\"#table-properties\">table properties</a>.</li><li>A table whose content needs more room than the note, such as a pasted table with many columns, also scrolls instead of stretching the note.</li><li>Wide tables scroll the same way in read-only notes and on shared pages.</li><li>When printing or exporting to PDF, a wide table is shrunk to fit the page.</li></ul><p>Tables inside other blocks, such as block quotes, admonitions, collapsible blocks, columns or tabs, are limited to the width of their block and do not scroll.</p><h3>Mobile support</h3><p>On the&nbsp;<a class=\"reference-link\" href=\"#root/_help_RDslemsQ6gCp\">Mobile Frontend</a>, a table keeps the width it has on a desktop and scrolls sideways, instead of squeezing its columns into the width of the screen. The full width of a table is the <em>Max content width</em> set in&nbsp;<a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Appearance</em> → <em>Content Width</em> on the mobile device, 1200 pixels by default. For example, a table set to <code>50%</code> is 600 pixels wide.</p><p>To resize columns on mobile, use the bar described in <a href=\"#resizing-with-touch\">Resizing with touch</a>.</p><h2>Long tables</h2><p>Since v0.107.0, the header rows of a table stay visible at the top of the note while you scroll through the rest of the table, and leave with the end of the table. This also works in read-only notes, on shared pages and in wide tables.</p><p>To turn rows into header rows, use <em>Set as header</em> in the <a href=\"#context-menu\">context menu</a>, or <em>Header row</em> in the <span class=\"tn-icon cke cke-table-row\"></span> button of the formatting toolbar.</p><p>To let header rows scroll away with the rest of the table, turn off <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Text Notes</em> → <em>Features</em> → <em>Use sticky header rows for tables</em>. The setting applies to the current device only, and shared pages keep their sticky header rows.</p><h2>Inserting new rows and new columns</h2><ul><li>To insert a new column, click on a desired location, then press the&nbsp;<span class=\"tn-icon cke cke-table-column\"></span> button from the formatting toolbar and select <em>Insert column left or right.</em></li><li>To insert a new row, click on a desired location, then press the&nbsp;<span class=\"tn-icon cke cke-table-row\"></span> button and select <em>Insert row above</em> or <em>below</em>.<ul><li>A quicker alternative to creating a new row while at the end of the table is to press the <kbd>Tab</kbd> key.</li></ul></li><li>Both operations are also available in the <a href=\"#context-menu\">context menu</a>, which inserts as many rows or columns as the selection spans.</li></ul><h2>Moving rows and columns</h2><p>Since v0.106.0, rows and columns can be reordered with the keyboard:</p><ul><li><kbd>Alt</kbd>+<kbd>Up</kbd> and <kbd>Alt</kbd>+<kbd>Down</kbd> move the rows touched by the selection up or down.</li><li><kbd>Alt</kbd>+<kbd>Left</kbd> and <kbd>Alt</kbd>+<kbd>Right</kbd> move the columns touched by the selection left or right.</li></ul><p>Merged cells are never split by a move. The rows or columns held together by a merged cell travel as one block, and moving toward such a block jumps over it entirely.</p><p>When the table has a header row, a header row moved below the header area becomes a regular row, and a regular row moved into the header area becomes a header row. Header columns behave the same way.</p><p>Outside of tables, <kbd>Alt</kbd>+<kbd>Left</kbd> and <kbd>Alt</kbd>+<kbd>Right</kbd> keep navigating the note history, and <kbd>Alt</kbd>+<kbd>Up</kbd> and <kbd>Alt</kbd>+<kbd>Down</kbd> keep moving the current paragraph.</p><h2>Sorting rows</h2><p>Since v0.107.0, the rows of a table can be sorted by the values of one column:</p><ul><li>To sort all the rows, place the cursor in any cell of the column to sort by, then select <em>Sort</em> → <em>Ascending</em> or <em>Descending</em> from the <a href=\"#context-menu\">context menu</a>. The same items are in the <span class=\"tn-icon bx bx-sort-alt-2\"></span>button of the formatting toolbar.</li><li>To sort only some of the rows, select their cells in the column to sort by, then sort the same way. Sorting is not available while the selection spans more than one column.</li></ul><p>Header rows always stay at the top of the table and are never sorted. A sort can be undone with <kbd>Ctrl</kbd>+<kbd>Z</kbd>.</p><h3>How values are compared</h3><p>Each cell is read as plain text, so formatting does not affect the order. Trilium then detects what kind of value the cell holds:</p><figure class=\"table\"><table><thead><tr><th>Kind</th><th>Examples</th><th>Compared by</th></tr></thead><tbody><tr><td>Time</td><td><code>15:02</code>, <code>15:02:38</code>, <code>3:02 PM</code></td><td>The time of day.</td></tr><tr><td>Date</td><td><code>2026-09-30</code>, <code>2026-09-30 15:02</code>, <code>30 September 2026</code>, <code>Wednesday, 30 September 2026</code>, <code>2026-09-30T15:02:38+03:00</code></td><td>The date and time.</td></tr><tr><td>Number</td><td><code>12</code>, <code>-3.5</code>, <code>1,234.56</code>, <code>$ 12.04</code>, <code>21 RON</code>, <code>24.5m</code></td><td>The numeric value.</td></tr><tr><td>Text</td><td>Anything else.</td><td>Alphabetically, ignoring case, with numbers inside the text in numeric order (<code>Item 9</code> before <code>Item 10</code>). Accents count, so <code>a</code> and <code>á</code> differ.</td></tr><tr><td>Empty</td><td>An empty cell, or one holding only spaces.</td><td>Not compared. Empty cells always go last.</td></tr></tbody></table></figure><p>Ascending order puts times first, then dates, numbers and text. Descending order reverses it. Empty cells go last in both directions.</p><p>Numbers, dates and times with the same value are ordered by their text, so <code>5 apples</code> comes before <code>5 pears</code>. Rows whose cells hold the same text, ignoring case, keep their relative order.</p><ul><li>Dates are also recognized in the formats of the note's language, such as <code>30.09.2026</code> or <code>30. September 2026</code> for German, and in the format chosen in&nbsp;<a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a>&nbsp;→ <em>Text Notes</em> → <em>Editor</em> → <em>Date/time format</em> for <a href=\"#root/_help_CohkqWQC1iBv\">inserting the date and time</a>.</li><li>A number can start with a currency symbol, such as <code>$</code>, <code>€</code> or <code>£</code>. Whatever follows the number, such as a unit, is ignored, so units are not converted: <code>1 km</code> sorts before <code>500 m</code>. A cell that starts with letters, such as <code>RON 21</code>, is text.</li><li>The decimal separator follows the language of the note: <code>1.500</code> is one and a half in English, but one thousand five hundred in German. A comma or period that is not followed by exactly three digits is always read as a decimal separator, so <code>1,5</code> is one and a half in either language.</li><li>The language of the note set in the&nbsp;<a class=\"reference-link\" href=\"#root/_help_AlJ73vBCjWDw\">Status bar</a>&nbsp;via the&nbsp;<span class=\"tn-icon bx bx-globe\"></span> icon, or else the default content language. See&nbsp;<a class=\"reference-link\" href=\"#root/_help_veGu4faJErEM\">Content language &amp; Right-to-left support</a>.</li></ul><h3>Merged cells</h3><p>Rows joined by a merged cell are kept together and move as one block. The block is sorted by the value in its first row. When the block has more than one cell in the sorted column, the other cells do not affect the order, and a message says so: <em>Some rows were sorted together because merged cells tie them to each other</em>.</p><p>When the selection covers only part of such a block, the whole block is sorted.</p><h2>Merging cells</h2><p>To merge two or more cells together, simply select them via drag &amp; drop and press the&nbsp;<span class=\"tn-icon cke cke-table-merge-cell\"></span> button from the formatting toolbar.</p><p>More options are available by pressing the arrow next to it:</p><ul><li>Click on a single cell and select Merge cell up/down/right/left to merge with an adjacent cell.</li><li>Select <em>Merge selected cells</em> to merge the selected cells, the same as pressing the button itself.</li><li>Select <em>Split cell vertically</em> or <em>horizontally</em>, to split a cell into multiple cells (can also be used to undo a merge).</li><li>Select <em>Unmerge cells</em> to turn each merged cell in the selection back into the single cells it covers, keeping its content in the top-left one.</li></ul><p><em>Merge selected cells</em> and <em>Unmerge cells</em> are available since v0.107.0. Merging and splitting are also available by right-clicking the selected cells, via the <a href=\"#context-menu\">context menu</a>, where <em>Unmerge cells</em> is in the <em>Split cell</em> submenu.</p><h2>Table properties</h2><figure class=\"image image-style-align-right\"><img style=\"aspect-ratio:312/311;\" src=\"{{helpAssets}}/User%20Guide/Note%20Types/Text/Tables_image.png\" width=\"312\" height=\"311\"></figure><p>The table properties can be accessed via the&nbsp;<span class=\"tn-icon cke cke-table-properties\"></span> button and allows for the following adjustments:</p><ul><li>Border (not the border of the cells, but the outer rim of the table), which includes the style (single, double), color and width.</li><li>The background color, with none set by default.</li><li>The width and height of the table in percentage (must end with <code>%</code>) or pixels (must end with <code>px</code>).</li><li>The alignment of the table.<ul><li>Left or right-aligned, case in which the text will flow next to it.</li><li>Centered, case in which text will avoid the table, regardless of the table width.</li></ul></li></ul><p>The table will immediately update to reflect the changes, but the <em>Save</em> button must be pressed for the changes to persist.</p><h2>Cell properties</h2><figure class=\"image image-style-align-right\"><img style=\"aspect-ratio:320/386;\" src=\"{{helpAssets}}/User%20Guide/Note%20Types/Text/1_Tables_image.png\" width=\"320\" height=\"386\"></figure><p>Similarly to table properties, the&nbsp;<span class=\"tn-icon cke cke-table-cell-properties\"></span> button opens a popup which adjusts the styling of one or more cells (based on the user's selection).</p><p>The following options can be adjusted:</p><ul><li>The border style, color and width (same as table properties), but applying to the current cell only.</li><li>The background color, with none set by default.</li><li>The width and height of the cell in percentage (must end with <code>%</code>) or pixels (must end with <code>px</code>).</li><li>The padding (the distance of the text compared to the cell's borders).</li><li>The alignment of the text, both horizontally (left, centered, right, justified) and vertically (top, middle or bottom).<ul><li>In a centered or right-aligned cell, each item of a bulleted, numbered or to-do list moves together with its bullet, number or checkbox.</li></ul></li></ul><p>The cell will immediately update to reflect the changes, but the <em>Save</em> button must be pressed for the changes to persist.</p><h2>Border and background colors</h2><p>The border and background colors of tables and cells adapt to the <a href=\"#root/_help_Wy267RK4M69c\">theme</a>, the same way as <a href=\"#root/_help_Gr6xFaF6ioJ5\">text colors</a> do. A color picked from the palette, chosen with the color picker or typed in is shown in a lighter or darker shade that suits the current theme, so borders stay visible and text stays readable on the background. The hue stays the same, and the table keeps the color as it was picked.</p><p>Colors applied with older versions of Trilium are shown exactly as they were picked, until the note is next edited.</p><p>Older browsers that can't adapt colors show them exactly as they were picked.</p><h2>Caption</h2><p>Press the&nbsp;<span class=\"tn-icon cke cke-caption\"></span> button to insert a caption or a text description of the table, which is going to be displayed above the table.</p><h2>Table borders</h2><p>By default, tables come with a gray border that is lighter or darker to suit the current <a href=\"#root/_help_Wy267RK4M69c\">theme</a>, so it stays discreet on a dark background.</p><p>To change the default border of every table, set the <code>--text-note-table-border-color</code> variable in a <a href=\"#root/_help_7NfNr5pZpVKV\">custom theme</a> or in <a href=\"#root/_help_AlhDUqhENtH7\">custom app-wide CSS</a>, for example <code>:root { --text-note-table-border-color: #555; }</code>. Set it to <code>transparent</code> to hide the borders of all the tables that don't have a border of their own.</p><p>To adjust the borders, follow these steps:</p><ol><li>Select the table.</li><li>In the floating panel, select the <em>Table properties</em> option (<span class=\"tn-icon cke cke-table-properties\"></span>).<ol><li>Look for the <em>Border</em> section at the top of the newly opened panel.</li><li>This will control the outer borders of the table.</li><li>Select a style for the border. Generally <em>Single</em> is the desirable option.</li><li>Select a color for the border.</li><li>Select a width for the border, expressed in pixels.</li></ol></li><li>Select all the cells of the table and then press the <em>Cell properties</em> option (<span class=\"tn-icon cke cke-table-cell-properties\"></span>).<ol><li>This will control the inner borders of the table, at cell level.</li><li>Note that it's possible to change the borders individually by selecting one or more cells, case in which it will only change the borders that intersect these cells.</li><li>Repeat the same steps as from step (2).</li></ol></li></ol><h3>Tables with invisible borders</h3><p>Tables can be set to have invisible borders in order to allow for basic layouts (columns, grids) of text or <a href=\"#root/_help_mT0HEkOsz6i1\">images</a> without the distraction of their border:</p><ol><li>First insert a table with the desired number of columns and rows.</li><li>Select the entire table.</li><li>In <em>Table properties</em>, set:<ol><li><em>Style</em> to <em>Single</em></li><li><em>Color</em> to <code>transparent</code></li><li>Width to <code>1px</code>.</li></ol></li><li>In Cell Properties, set the same as on the previous step.</li></ol><h2>Table indentation</h2><p>Since v0.104.1, tables can be indented as a block (the whole table moves, rather than just the content of a cell).</p><ol><li>Click the&nbsp;<span style=\"--tn-color:hsl(0,0%,60%);color:hsl(0,0%,60%);\"><span class=\"tn-icon cke cke-drag-handle\"></span></span> button to select the entire table. Otherwise, the indentation applies only to the current cell's content.</li><li>Press <kbd>Tab</kbd> to increase the indent, or <kbd>Shift</kbd>+<kbd>Tab</kbd> to decrease it. Alternatively, use the indentation buttons in the formatting toolbar.</li></ol><p>Markdown does not support indented tables, so the indentation is lost when converting to Markdown.</p><h2>Markdown import/export</h2><p>Simple tables are exported in GitHub-flavored Markdown format (e.g. a series of <code>|</code> items). If the table is found to be more complex (it contains HTML elements, has custom sizes or images), the table is converted to a HTML one instead.</p><p>Generally formatting loss should be minimal when exported to Markdown due to the fallback to HTML formatting.</p>",
"_help_pwc194wlRzcH": "<figure class=\"image image-style-align-right\"><img style=\"aspect-ratio:265/108;\" src=\"{{helpAssets}}/User%20Guide/Note%20Types/Text/Text%20Snippets_image.png\" width=\"265\" height=\"108\"></figure><p>Text Snippets are closely related to&nbsp;<a class=\"reference-link\" href=\"#root/_help_KC1HB96bqqHX\">Templates</a>, but instead of defining the content of an entire note, text snippets are pieces of formatted text that can easily be inserted in a text note.</p><h2>Creating a text snippet</h2><p>In the&nbsp;<a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a>: </p><ol><li>Right click a note where to place the text snippet.</li><li>Select <em>Insert child note</em>.</li><li>Select <em>More</em> → <em>Text snippet</em>.</li></ol><p>Afterwards, simply type in the content of the note the desired text. The text can be formatted in the same manner as a normal text note.</p><p>The title of the note will become the title of the template. Optionally, a description can be added in the&nbsp;<a class=\"reference-link\" href=\"#root/_help_OFXdgB2nNk1F\">Promoted Attributes</a>&nbsp;section.</p><h2>Inserting a snippet</h2><p>Once a snippet is created, there are two options to insert it:</p><ol><li>From the&nbsp;<a class=\"reference-link\" href=\"#root/_help_nRhnJkTT8cPs\">Formatting toolbar</a>, by looking for the&nbsp;<span class=\"tn-icon cke cke-trilium-template\"></span> button.</li><li>Using&nbsp;<a class=\"reference-link\" href=\"#root/_help_ZlN4nump6EbW\">Slash Commands</a>: <ol><li>To look for a specific template, start typing the name of the template (its title).</li><li>To look for all the templates, type <code>template</code>.</li></ol></li></ol><aside class=\"admonition tip\"><p>A newly created snippet doesn't appear? Generally it takes up to a few seconds to refresh the list of templates once you make a change.</p><p>If this doesn't happen, <a href=\"#root/_help_s8alTXmpFR61\">reload the application</a> and <a href=\"#root/_help_wy8So3yZZlH9\">report the issue</a>to us.&nbsp;</p></aside><h2>Limitations</h2><ul><li>Whenever a snippet is created, deleted or its title/description are modified, all the open text notes will need to be refreshed. This causes a slight flash for usually under a second, but it can cause some discomfort.</li><li>Unlike&nbsp;<a class=\"reference-link\" href=\"#root/_help_KC1HB96bqqHX\">Templates</a>, the snippets cannot be limited to a particular <a href=\"#root/_help_9sRHySam5fXb\">workspace</a>.</li></ul>",
"_help_fASfBrYnquKU": "<h2>Extended task states</h2><figure class=\"image image-style-align-left\"><img style=\"aspect-ratio:303/264;\" src=\"{{helpAssets}}/User%20Guide/Note%20Types/Text/To-do%20Lists_image.png\" width=\"303\" height=\"264\"></figure><p>In Trilium, to-do items aren't limited to a simple \"done\" or \"not done.\" Tasks can also be marked as <em>in progress</em> (\"doing\"), <em>under consideration</em> (\"maybe\"), or <em>cancelled</em> (\"won't do\"), thus giving a more accurate picture of where things actually stand.</p><p>Right-click the checkbox and select the desired state. Alternatively, press <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Enter </kbd> to cycle through the task states. Tapping or left-clicking the checkbox will always toggle between \"None\" and \"Done\". On the <a class=\"reference-link\" href=\"#root/_help_RDslemsQ6gCp\">Mobile Frontend</a>, the states are buttons in the row of the <em>List ›</em> button, which shows while the cursor is in the list.</p><p>Task states are fully preserved when converting between&nbsp;<a class=\"reference-link\" href=\"#root/_help_iPIMuisry3hd\">Text</a>&nbsp;and&nbsp;<a class=\"reference-link\" href=\"#root/_help_6RM1Q7ppFVoj\">Markdown</a>&nbsp;notes, in both directions.</p><h3>Customizing the extended task states</h3><p>Task states are customizable: you can reorder them, create new ones with different colors and symbols, or delete the ones you don't need. See&nbsp;<a class=\"reference-link\" href=\"#root/_help_i16PM6A7GXdU\">Customizing to-do task states</a>&nbsp;for more details.</p><h2>Keyboard shortcuts</h2><p>When at the beginning on an empty paragraph, type the following to insert a to-do list:</p><ul><li><code>[ ]</code> for an unchecked item</li><li><code>[x]</code> for a checked item</li></ul><p>Extended task states are supported as well, using its corresponding <em>Markdown symbol</em>. These are the defaults but they can be changed if needed (see&nbsp;<a class=\"reference-link\" href=\"#root/_help_i16PM6A7GXdU\">Customizing to-do task states</a>):</p><ul><li><code>[/]</code> for “Doing”.</li><li><code>[?]</code> for “Maybe”.</li><li><code>[-]</code> for “Cancelled”.</li></ul><p>To reorder the item under the cursor, press <kbd>Alt</kbd>+<kbd>Up</kbd> or <kbd>Alt</kbd>+<kbd>Down</kbd>. To reorder multiple items, select them first.</p><h2>See also</h2><ul><li>To-do lists are meant for small task lists. For more complicated, day-to-day task tracking consider using a&nbsp;<a class=\"reference-link\" href=\"#root/_help_CtBQqbwXDx1w\">Kanban Board</a>&nbsp;collection instead.</li></ul>",
"_help_6f9hih2hXXZk": "<p>Trilium supports creating \"code\" notes, i.e. notes which contain some sort of formal code - be it programming language (C++, JavaScript), structured data (JSON, XML) or other types of codes (CSS etc.).</p><p>This can be useful for a few things:</p><ul><li>computer programmers can store code snippets as notes with syntax highlighting</li><li>JavaScript code notes can be executed inside Trilium for some extra functionality<ul><li>we call such JavaScript code notes \"scripts\" – see&nbsp;<a class=\"reference-link\" href=\"#root/_help_CdNpE2pqjmI6\">Scripting</a></li></ul></li><li>JSON, XML etc. can be used as storage for structured data (typically used in conjunction with scripting)</li></ul><p>For shorter snippets of code that can be embedded in&nbsp;<a href=\"#root/_help_iPIMuisry3hd\">Text</a>&nbsp;notes, see&nbsp;<a href=\"#root/_help_QxEyIjRBizuC\">Code blocks</a>.</p><p><img src=\"{{helpAssets}}/User%20Guide/Note%20Types/Code_image.jpg\"></p><h2>Creating a code note</h2><p>In the <a href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a>, right-click a note and select <em>Insert child note</em> or <em>Insert note after</em>, then:</p><ul><li>To create a plain text code note, select <em>Code</em>.</li><li>To create a code note in a given language, hover <em>Code</em> and select the language. The list shows the languages enabled in the options (see below), and ends with <em>Configure code notes...</em>, which opens them.</li></ul><h2>Adjusting the language of a code note</h2><p>To change the language of a code note, look for the&nbsp;<span class=\"tn-icon bx bx-code\"></span> icon in the&nbsp;<a class=\"reference-link\" href=\"#root/_help_AlJ73vBCjWDw\">Status bar</a>. When clicked it will reveal the list of available languages (which can be customized according to the section below). The menu also features a search bar to quickly filter, and icons to visually distinguish some of the programming languages.</p><p>On the&nbsp;<a class=\"reference-link\" href=\"#root/_help_RDslemsQ6gCp\">Mobile Frontend</a>, the same list is available in the&nbsp;<a class=\"reference-link\" href=\"#root/_help_8YBEPzcpUgxw\">Note menu</a>&nbsp;→ <em>Note settings</em> → <em>Change language mode</em>.</p><h2>Adjusting the list of languages</h2><p>Trilium supports syntax highlighting for many languages, but by default displays only some of them. To change which languages are offered, go to <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Code Notes</em> and find <em>Available MIME types in the dropdown</em>. Here you can:</p><ul><li>Add a language by pressing the <span class=\"tn-icon bx bx-plus\"></span> <em>Add another language</em> button, which also shows how many languages are left, and then selecting it. While picking, hover a language to see where it is syntax highlighted.</li><li>Press the <span class=\"tn-icon bx bx-x\"></span> button beside a language, or select it and press <kbd>Delete</kbd>, to remove it from the list. <em>Plain text</em> cannot be removed.</li><li>See where each language is syntax highlighted: the <em>Code blocks</em> badge stands for code blocks in text notes, the <em>Code notes</em> badge for code notes.</li></ul><p>The languages are listed in the same order wherever you choose one: the language menu in the <a class=\"reference-link\" href=\"#root/_help_AlJ73vBCjWDw\">Status bar</a>, the <em>Code</em> submenu when creating a note, and the language of a code block. By default, the list is sorted alphabetically, with <em>Plain text</em> first. To use an order of your own:</p><ol><li>Turn off the <em>Sort alphabetically</em> switch at the top of the section.</li><li>Hold the <strong>=</strong> handle shown beside a language, and then drag it up or down. Alternatively, select a language and press <kbd>Ctrl</kbd>+<kbd>↑</kbd> or <kbd>Ctrl</kbd>+<kbd>↓</kbd>.</li></ol><p>Turning <em>Sort alphabetically</em> back on does not discard your order: it is used again the next time the switch is turned off.</p><p>Note that the list of languages is not immediately refreshed, you'd have to manually <a href=\"#root/_help_s8alTXmpFR61\">refresh the application</a>.</p><p>The list of languages is also shared with the&nbsp;<a href=\"#root/_help_QxEyIjRBizuC\">Code blocks</a>&nbsp;feature of&nbsp;<a href=\"#root/_help_iPIMuisry3hd\">Text</a>&nbsp;notes.</p><h2>Word wrap</h2><p>Long lines can be displayed on multiple lines:</p><ul><li>Globally for all code notes, from&nbsp;<a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a>&nbsp;→ <em>Code Notes.</em></li><li>For a particular note, by going to the menu in&nbsp;<a class=\"reference-link\" href=\"#root/_help_8YBEPzcpUgxw\">Note menu</a>&nbsp;and selecting <em>Word wrap</em> and selecting the appropriate option:<ul><li><em>Auto</em>, to respect the global word wrap for code notes.</li><li><em>On</em> or <em>Off</em>, to change the state of the word wrap for this note regardless of the global option.</li></ul></li></ul><aside class=\"admonition note\"><p>Word wrapping can also be adjusted at note level through the <code>#wrapLines</code> <a href=\"#root/_help_HI6GBBIduIgv\">label</a>, which can also be inherited.</p></aside><h2>Line numbers</h2><p>The numbers at the start of each line can be hidden from <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Code Notes</em> → <em>Editor</em> → <em>Line numbers</em>. The setting applies to every code editor, such as the source of a <a href=\"#root/_help_6RM1Q7ppFVoj\">Markdown</a> note, and to code shown without its editor (see <em>Color schemes</em> below).</p><p>An included code note or an embedded code file can show or hide them on its own through the <em>Line numbers</em> submenu of its <em>More actions</em> menu, see <a class=\"reference-link\" href=\"#root/_help_nBAXQFj20hS1\">Include Note</a>. Its <em>Auto</em> entry follows the setting.</p><h2>Adjusting options using the status bar</h2><p>The status bar at the bottom of the editor shows the position of the cursor, the current indentation settings and language.</p><p>The cursor position is shown as <em>Ln</em> (the line) and <em>Col</em> (the column), both counted from 1. A tab counts as many columns as the display width of tabs, so the column matches where the cursor appears on screen. While text is selected, <em>Selected</em> shows the number of selected characters, counting each line break as one.</p><p>Clicking on the indentation indicator opens a menu with three sections:</p><ol><li><em>Indent Using</em> — switch between Spaces and Tabs (<code>#indentWithTabs</code>). If a per-note override is active, a \"Reset to default\" option appears.</li><li><em>Display Width</em> — choose from preset widths (1, 2, 3, 4, 6, 8). Changes are saved as a per-note <code>#tabWidth</code> label.</li><li><em>Re-indent Content To</em> — convert existing indentation to a different style. For example, re-indent a file from 4 spaces to 2 spaces, or from spaces to tabs. This rewrites the leading whitespace on every line while preserving alignment remainders.</li></ol><p>Clicking the language indicator lets you change the note's MIME type. As in the <em>Note type</em> selector, typing narrows the list of languages.</p><p>The same two menus are in the toolbar of a code note or a code file included in a text note, see&nbsp;<a class=\"reference-link\" href=\"#root/_help_nBAXQFj20hS1\">Include Note</a>.</p><h3>Re-indentation</h3><p>When you re-indent content, the editor:</p><ul><li>Measures the visual column width of each line's leading whitespace using the current style</li><li>Calculates indent levels and any alignment remainder</li><li>Rebuilds the leading whitespace in the target style</li><li>Preserves non-leading whitespace, blank lines, and content without indentation</li></ul><h2>Transforming text</h2><p>To change the selected lines or text, right-click the selection and open <em>Transform</em>. Its commands come in three groups:</p><ul><li><em>Sort ascending</em>, <em>Sort descending</em>, <em>Shuffle lines</em>, <em>Reverse line order</em> and <em>Deduplicate lines</em>, which keeps the first copy of each line.</li><li><em>Trim leading</em>, <em>Trim trailing</em> and <em>Trim both</em> remove the whitespace at the start, at the end or at both ends of each line. <em>Remove blank lines</em> also removes the lines that hold only whitespace.</li><li><em>To uppercase</em>, <em>To lowercase</em>, <em>To sentence case</em>, <em>To title case</em> and <em>Remove diacritics</em>.</li></ul><p>The commands of the first two groups change every line that the selection touches, even partly. Those of the third group change only the selected text. Each change is undone in one step with <kbd>Ctrl</kbd>+<kbd>Z</kbd>.</p><ul><li>Sorting reads numbers, dates and times by their value, as sorting a table does (see <a class=\"reference-link\" href=\"#root/_help_NdowYOC1GFKS\">Tables</a>), and ignores the case of letters and the indentation. Blank lines go last.</li><li><em>To sentence case</em> lowercases the text and capitalizes the first word of each sentence and of each line. <em>To title case</em> capitalizes every word except minor words such as \"of\" and \"the\", which stay lowercase unless they start or end a sentence.</li><li><em>Remove diacritics</em> turns letters such as <code>é</code>, <code>ș</code> and <code>ł</code> into <code>e</code>, <code>s</code> and <code>l</code>, and removes the vowel points of Hebrew and Arabic. Letters such as <code>ß</code> and <code>æ</code> stay as they are.</li><li>Sorting and the case changes follow the language set in <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Language &amp; Region</em> → <em>Default content language</em>. In Turkish, for example, an uppercase <code>i</code> is <code>İ</code>.</li></ul><h2>Color schemes</h2><p>Since Trilium 0.94.0 the colors of code notes can be customized by going&nbsp;<a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a>&nbsp;→ Code Notes and looking for the <em>Appearance</em> section.</p><p>A code note or a code file shown without its editor, such as in an&nbsp;<a class=\"reference-link\" href=\"#root/_help_nBAXQFj20hS1\">Include Note</a>, on the cards of&nbsp;<a class=\"reference-link\" href=\"#root/_help_GTwFsgaA0lCt\">Collections</a> or in a tooltip, uses the same colors and line numbers as the editor does. A printout uses the <em>Light theme</em>. A <a href=\"#root/_help_R9pX4DGra2Vt\">shared page</a> uses the VS Code light or dark theme, following the mode of the page.</p><aside class=\"admonition note\"><p><strong>Why are there only a few themes whereas the code block themes for text notes have a lot?</strong><br>The reason is that Code notes use a different technology than the one used in Text notes, and as such there is a more limited selection of themes. If you find a CodeMirror 6 (not 5) theme that you would like to use, let us know and we might consider adding it to the set of default themes. There is no possibility of adding new themes (at least for now), since the themes are defined in JavaScript and not at CSS level.</p></aside><h2>Programming ligatures</h2><p>If you see <code>!=</code> displayed as <code>≠</code> or <code>-&gt;</code> as <code>→</code> inside a code note, those are <em>font ligature</em>: the default monospace font draws certain character pairs as a single symbol. The underlying text is not changed by Trilium (unlike text notes which have&nbsp;<a class=\"reference-link\" href=\"#root/_help_oI7GoyilXXAr\">Automatic replacements</a>), and copying it out gives you back <code>!=</code> and <code>-&gt;</code>.</p><p>This can be turned off with&nbsp;<a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a><em>→ Appearance → Fonts → Programming ligatures</em>.</p><h2>Virtual keyboard behavior</h2><p>When using a virtual keyboard, keyboard suggestions and corrections are controlled as follows:</p><ul><li>For&nbsp;<a class=\"reference-link\" href=\"#root/_help_6RM1Q7ppFVoj\">Markdown</a>&nbsp;and plain text code notes, the autocorrect is <strong>on</strong>, as well as automatic capitalization.</li><li>For all the other code notes, the autocorrect is off in order to avoid issues when typing code.</li></ul><aside class=\"admonition note\"><p>Not all browsers and platforms respect this value, so the keyboard suggestions might appear without autocorrecting or the browser might disregard this and autocorrect anyway.</p></aside>",
diff --git a/docs/User Guide/User Guide/Note Types/Text/Lists.md b/docs/User Guide/User Guide/Note Types/Text/Lists.md
index 16a3cf14b1..7ea98fb682 100644
--- a/docs/User Guide/User Guide/Note Types/Text/Lists.md
+++ b/docs/User Guide/User Guide/Note Types/Text/Lists.md
@@ -60,6 +60,10 @@ It possible to add content-level blocks such as headings, code blocks, tables wi
The same principle applies to all three list types (bullet, numbered and to-do).
+## Alignment
+
+A list item can be centered or aligned to the right, either with the text alignment button in the formatting toolbar or by aligning the <a class="reference-link" href="Tables.md">Tables</a> cell that contains the list. The bullet, number or checkbox then moves together with the text of the item.
+
## To-do lists
See <a class="reference-link" href="To-do%20Lists.md">To-do Lists</a>.
diff --git a/docs/User Guide/User Guide/Note Types/Text/Tables.md b/docs/User Guide/User Guide/Note Types/Text/Tables.md
index bb0413b231..595f251c8e 100644
--- a/docs/User Guide/User Guide/Note Types/Text/Tables.md
+++ b/docs/User Guide/User Guide/Note Types/Text/Tables.md
@@ -211,6 +211,7 @@ The following options can be adjusted:
* The width and height of the cell in percentage (must end with `%`) or pixels (must end with `px`).
* The padding (the distance of the text compared to the cell's borders).
* The alignment of the text, both horizontally (left, centered, right, justified) and vertically (top, middle or bottom).
+ * In a centered or right-aligned cell, each item of a bulleted, numbered or to-do list moves together with its bullet, number or checkbox.
The cell will immediately update to reflect the changes, but the _Save_ button must be pressed for the changes to persist.
diff --git a/packages/ckeditor5/src/theme/ck-content.css b/packages/ckeditor5/src/theme/ck-content.css
index 52145065eb..0e2e1d21fc 100644
--- a/packages/ckeditor5/src/theme/ck-content.css
+++ b/packages/ckeditor5/src/theme/ck-content.css
@@ -1,6 +1,7 @@
@import "ckeditor5/ckeditor5-content.css";
@import "./content_colors.css";
@import "./admonitions.css";
+@import "./lists.css";
.printed-content .ck-widget__selection-handle, .printed-content .ck-widget__type-around { /* gets rid of triangles: https://github.com/zadam/trilium/issues/1129 */
display: none;
diff --git a/packages/ckeditor5/src/theme/lists.css b/packages/ckeditor5/src/theme/lists.css
new file mode 100644
index 0000000000..e556e37f34
--- /dev/null
+++ b/packages/ckeditor5/src/theme/lists.css
@@ -0,0 +1,24 @@
+/*
+ * An aligned list item shrinks to its text and moves to that side, so that its marker or to-do
+ * checkbox stays next to the text. The selectors match the `style` that `TableCellProperties`
+ * writes on a cell and that `Alignment` writes on the item's paragraph.
+ */
+.ck-content {
+ :is(td, th)[style*="text-align:center"] li,
+ li:has(> p:first-of-type[style*="text-align:center"]) {
+ width: fit-content;
+ margin-inline: auto;
+ }
+
+ :is(td, th)[style*="text-align:right"] li,
+ li:has(> p:first-of-type[style*="text-align:right"]) {
+ width: fit-content;
+ margin-left: auto;
+ }
+
+ :is(td, th)[style*="text-align:left"] li,
+ li:has(> p:first-of-type[style*="text-align:left"]) {
+ width: fit-content;
+ margin-right: auto;
+ }
+}
diff --git a/packages/ckeditor5/src/theme/lists.spec.ts b/packages/ckeditor5/src/theme/lists.spec.ts
new file mode 100644
index 0000000000..e2f2e24857
--- /dev/null
+++ b/packages/ckeditor5/src/theme/lists.spec.ts
@@ -0,0 +1,129 @@
+import "ckeditor5/ckeditor5.css";
+import "./todo_lists.css";
+import "./lists.css";
+
+import { Alignment, Essentials, List, Paragraph, Table, TableCellProperties, TodoList } from "ckeditor5";
+import type { ClassicEditor } from "ckeditor5";
+import { describe, expect, it, onTestFinished } from "vitest";
+
+import { createTestEditor } from "../../test/editor-kit.js";
+
+const PLUGINS = [Essentials, Paragraph, List, TodoList, Table, TableCellProperties, Alignment];
+const TODO_ITEM = `<li><label class="todo-list__label"><input type="checkbox" disabled="disabled"></label>`;
+
+describe("lists.css", () => {
+ it("moves the items of a list in a centered or right-aligned cell with their text", async () => {
+ const tableWidth = document.head.appendChild(document.createElement("style"));
+ tableWidth.textContent = ".ck-content .table { width: 600px; }";
+ onTestFinished(() => tableWidth.remove());
+ const editor = await editorWith(`<figure class="table"><table><tbody><tr>
+ <td style="text-align:center"><ul><li>a</li></ul></td>
+ <td style="text-align:right"><ol><li><p>b</p><p>c</p></li></ol></td>
+ <td><ul><li>d</li></ul></td>
+ <td style="text-align:center"><ul class="todo-list">${TODO_ITEM}<p>e</p></li></ul></td>
+ </tr></tbody></table></figure>`);
+ const [ centered, rightAligned, plain, todo ] = items(editor);
+
+ expectCentered(centered);
+ expectRightAligned(rightAligned);
+ expectFullWidth(plain);
+ expectCentered(todo);
+ expectCheckboxBeforeText(todo);
+ });
+
+ it("moves list items aligned with the alignment button with their text", async () => {
+ const editor = await editorWith(`
+ <ul><li><p style="text-align:center">a</p></li></ul>
+ <ol><li><p style="text-align:right">b</p></li></ol>
+ <ul><li>c</li></ul>
+ <ul class="todo-list">${TODO_ITEM}<p style="text-align:center">d</p></li></ul>
+ `);
+ const [ centered, rightAligned, plain, todo ] = items(editor);
+
+ expectCentered(centered);
+ expectRightAligned(rightAligned);
+ expectFullWidth(plain);
+ expectCentered(todo);
+ expectCheckboxBeforeText(todo);
+ });
+
+ it("moves a left-aligned item to the left in right-to-left content", async () => {
+ const editor = await editorWith(`
+ <ul><li><p style="text-align:left">a</p></li></ul>
+ <p>-</p>
+ <ul><li>b</li></ul>
+ `, "ar");
+ const [ leftAligned, plain ] = items(editor);
+
+ expect(leftAligned.getBoundingClientRect().left).toBeCloseTo(listBox(leftAligned).left, 0);
+ expect(leftAligned.getBoundingClientRect().width).toBeLessThan(listBox(leftAligned).width / 2);
+ expectFullWidth(plain);
+ });
+});
+
+async function editorWith(data: string, contentLanguage = "en") {
+ const editor = await createTestEditor(PLUGINS, { language: { ui: "en", content: contentLanguage } });
+ editor.setData(data);
+ return editor;
+}
+
+/** The first list item of each top-level list, or of each table cell, in document order. */
+function items(editor: ClassicEditor) {
+ const root = editor.editing.view.getDomRoot();
+ if (!root) {
+ throw new Error("The editor has no editing root.");
+ }
+ const lists = root.querySelectorAll(":is(td, .ck-editor__editable_inline) > :is(ul, ol)");
+ const result: HTMLLIElement[] = [];
+ for (const list of lists) {
+ const item = list.querySelector("li");
+ if (!item) {
+ throw new Error("A list has no items.");
+ }
+ result.push(item);
+ }
+ return result;
+}
+
+function expectCentered(item: HTMLLIElement) {
+ const box = item.getBoundingClientRect();
+ const list = listBox(item);
+ expect(box.width).toBeLessThan(list.width / 2);
+ expect(box.left - list.left).toBeCloseTo(list.right - box.right, 0);
+}
+
+function expectRightAligned(item: HTMLLIElement) {
+ expect(item.getBoundingClientRect().width).toBeLessThan(listBox(item).width / 2);
+ expect(item.getBoundingClientRect().right).toBeCloseTo(listBox(item).right, 0);
+}
+
+function expectFullWidth(item: HTMLLIElement) {
+ expect(item.getBoundingClientRect().width).toBeCloseTo(listBox(item).width, 0);
+}
+
+/** The checkbox ends at most a few pixels before the item's text. */
+function expectCheckboxBeforeText(item: HTMLLIElement) {
+ const checkbox = item.querySelector("input")?.getBoundingClientRect();
+ const textElement = item.querySelector(":is(p, .todo-list__label__description)");
+ if (!checkbox || !textElement) {
+ throw new Error("The to-do item has no checkbox or text.");
+ }
+ const range = document.createRange();
+ range.selectNodeContents(textElement);
+ const text = range.getBoundingClientRect();
+ expect(text.left - checkbox.right).toBeGreaterThanOrEqual(0);
+ expect(text.left - checkbox.right).toBeLessThan(16);
+}
+
+/** The box the list's items lay out in: the list without its padding. */
+function listBox(item: HTMLLIElement) {
+ const list = item.parentElement;
+ if (!list) {
+ throw new Error("The item is not in a list.");
+ }
+ const rect = list.getBoundingClientRect();
+ const style = getComputedStyle(list);
+ const left = rect.left + parseFloat(style.paddingLeft);
+ const right = rect.right - parseFloat(style.paddingRight);
+ return { left, right, width: right - left };
+}