Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
feat(mobile/text): open widget toolbar lists as bottom menus
Elian Doran75a5f9f700e1
diff --git a/apps/server/src/assets/help/help_content.json b/apps/server/src/assets/help/help_content.jsonindex ddaa7ceaec..fd07830880 100644--- a/apps/server/src/assets/help/help_content.json+++ b/apps/server/src/assets/help/help_content.json@@ -29,7 +29,7 @@"_help_yeEaYqosGLSh": "<p>As an alternative to <a href=\"#root/_help_Dgg7bR3b6K9j\">hosting your own Trilium instance</a>, there are two services out there that provide out of the box support for Trilium.</p><aside class=\"admonition important\"><p><strong>Disclaimer</strong>: The Trilium Notes project and maintainers are not directly affiliated with either of the projects.</p><p>PikaPods have gracefully offered us free credits for testing purposes.</p></aside><h2>Cloud instance providers</h2><h3>PikaPods</h3><ol><li>Go to <a href=\"https://www.pikapods.com\">pikapods.com</a> and sign up.</li><li>In the “Available Apps” section, look for \"TriliumNext<br> and select “Run your own”.</li><li>Follow the on-screen instructions to set up your own cloud hosted instance.</li></ol><p>PikaPods generally updates their Trilium instances to the latest version within a two-week interval after a new version is released.</p><h2>Matching your version with the cloud instance</h2><p>Please note that once you set up <a class=\"reference-link\" href=\"#root/_help_cbkrhQjrkKrh\">Synchronization</a> between a cloud instance and <a href=\"#root/_help_poXkQfguuA0U\">desktop</a> clients, it's important that the version of the desktop application and the server match up.</p><p>When setting up a cloud instance, it's best to check the version of the server by accessing it via a web browser and going to the <em>About</em> section. It's best that both the desktop and the server have the same <em>App version</em>; however it's generally OK to update the desktop to a newer version than the server if it has the same <em>Sync version</em>.</p><p>If the <em>Sync version</em> between the server and the desktop application doesn't match, synchronization will not work.</p>","_help_iGTnKjubbXkA": "<ul><li>Using Docker, the server can be run on Windows, Linux and macOS devices.</li><li>Native binaries are provided for Linux x64 and ARM (<code>aarch64</code>).</li></ul><h2>Legacy ARM support</h2><p>The Docker builds also provide <code>linux/arm/v7</code> and <code>linux/arm/v8</code> platforms. These platforms are considered legacy since Trilium uses Node.js version 24 which have <a href=\"https://github.com/nodejs/node/commit/6682861d6f\">officially downgraded support</a> for these platforms to “experimental”.</p><p>As a result, Trilium needs to use Node.js 22 for these versions. As soon as soon Node.js 22 will no longer be compatible, support for <code>armv7</code> and <code>armv8</code> will be dropped entirely.</p><p>Regardless of upstream support, these platforms are supported on a best-effort basis and are not officially supported by the Trilium development team. Bug reports are accepted but they will not be treated with priority; contributions are welcome.</p>","_help_cbkrhQjrkKrh": "<p>Trilium is an offline-first note-taking application that stores all data locally on the desktop client. However, it also offers the option to set up synchronization with a server instance, allowing multiple desktop clients to sync with a central server. This creates a star-shaped topology:</p><p><img src=\"{{helpAssets}}/User%20Guide/Installation%20%26%20Setup/Synchronization_image.jpg\"></p><p>In this setup, a central server (referred to as the <em>sync server</em>) and multiple <em>client</em> (or <em>desktop</em>) instances synchronize with the sync server. Once configured, synchronization is automatic and ongoing, requiring no manual intervention.</p><h2>Setting Up Synchronization</h2><h3>Security Considerations</h3><p>Setting up the server securely is critical and can be complex. It is crucial to use a valid <a href=\"#root/_help_l2VkvOwUNfZj\">TLS certificate</a> (HTTPS) rather than an unencrypted HTTP connection to ensure security and avoid potential vulnerabilities.</p><h3>Synchronizing a Desktop Instance with a Sync Server</h3><p>This method is used when you already have a desktop instance of Trilium and want to set up a sync server on your web host.</p><ol><li><strong>Server Deployment</strong>: Ensure your server instance is deployed but uninitialized.</li><li><strong>Desktop Configuration</strong>: Open your desktop instance, navigate to <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Sync</em> → <em>Sync server</em>, and set the <em>Server address</em> to your sync server's address.<ul><li>Note that the sync server can also be overridden through <a class=\"reference-link\" href=\"#root/_help_Gzjqa934BdH4\">Configuration (config.ini or environment variables)</a>, case in which that value takes precedence. If that's the case, a field called <em>Server in use</em> indicates it.</li></ul></li><li><strong>Testing Sync</strong>: Click the <em>Test sync</em> button to verify the connection to the sync server.<ul><li>If successful, the client will start pushing all data to the server instance.</li><li>This process may take some time, but you can continue using Trilium. Periodically check the server instance to confirm when the sync is complete. Once finished, you should see the login screen on the server.</li></ul></li></ol><h3>Synchronizing a Desktop Instance from a Sync Server</h3><p>This method is used when you already have a sync server and want to configure a new desktop instance to sync with it.</p><ol><li><strong>Desktop Setup</strong>: Follow the <a href=\"#root/_help_poXkQfguuA0U\">desktop installation page</a>.</li><li><strong>Initial Configuration</strong>: When prompted, choose the option to set up sync with a sync server.</li></ol><p><img src=\"{{helpAssets}}/User%20Guide/Installation%20%26%20Setup/Synchronization_sync-init.png\" alt=\"screenshot of the sync from server setup page\"></p><ol><li><strong>Server Details</strong>: Configure the Trilium server address and enter the server's password. If the server has <a class=\"reference-link\" href=\"#root/_help_7DAiwaf8Z7Rz\">Multi-factor authentication with TOTP</a> enabled, also enter a one-time password from your authenticator app, or a recovery code.</li><li><strong>Finish Setup</strong>: Click the \"Finish setup\" button. If successful, you will see the following screen:</li></ol><p><img src=\"{{helpAssets}}/User%20Guide/Installation%20%26%20Setup/Synchronization_sync-in-progress.png\" alt=\"screenshot of the sync page\"></p><p>Once synchronization is complete, you will be automatically redirected to the Trilium application.</p><h3>Desktop-to-desktop sync</h3><p>This method allows two desktop instances to synchronize between each other without requiring a <a class=\"reference-link\" href=\"#root/_help_WOcw2SLH6tbX\">Server Installation</a>.</p><aside class=\"admonition warning\"><p>Since v0.104.0, LAN access needs to be enabled to allow this sync to function. See <a class=\"reference-link\" href=\"#root/_help_swSFivWk6KkA\">Network Access</a> for information on how to do so.</p></aside><h2>Proxy Configuration</h2><p>Two proxy setups are supported:</p><ul><li><strong>Explicit Proxy Configuration</strong>: Set the proxy server in Options / Sync. Only unauthenticated proxy servers are supported.</li><li><strong>System Proxy Settings</strong>: If no proxy server is explicitly configured, Trilium will use the system proxy settings.</li></ul><h2>Troubleshooting</h2><h3>Date/Time Synchronization</h3><p>For successful synchronization, both client and server must have the same date and time, with a tolerance of up to five minutes.</p><h3>Certificate Issues</h3><p>When using TLS, Trilium will verify the server certificate. If verification fails (e.g., due to self-signed certificates or certain corporate proxies), you can run the Trilium client with the <code>NODE_TLS_REJECT_UNAUTHORIZED</code> environment variable set to <code>0</code>:</p><pre><code class=\"language-text-x-trilium-auto\">export NODE_TLS_REJECT_UNAUTHORIZED=0</code></pre><p>This will disable TLS certificate verification, significantly reducing security and exposing the setup to MITM attacks. It is strongly recommended to use a valid signed server certificate. Newer Trilium versions include a script called <code>trilium-no-cert-check.sh</code> for this purpose.</p><h3>Conflict Resolution</h3><p>If you edit the same note on multiple instances before synchronization, Trilium resolves conflicts by retaining the newer change and discarding the older one. The older version remains accessible in <a href=\"#root/_help_vZWERwf8U3nx\">note revisions</a>, allowing data recovery if needed.</p><h3>Hash Check</h3><p>After each synchronization, Trilium computes a hash of all synced data on both the client and the sync server. If there is a discrepancy, Trilium will automatically initiate a recovery mechanism to resolve the issue.</p>",- "_help_RDslemsQ6gCp": "<figure class=\"image image-style-align-right image_resized\" style=\"width:33.52%;\"><img style=\"aspect-ratio:1242/2688;\" src=\"{{helpAssets}}/User%20Guide/Installation%20%26%20Setup/Mobile%20Frontend_IMG_1765.PNG\" width=\"1242\" height=\"2688\"></figure><p>Trilium has a mobile web frontend which is optimized for touch based devices - smartphones and tablets. It is activated automatically during login process based on browser detection.</p><p>Mobile frontend is limited in features compared to the full desktop version. See below for more details on this.</p><h2>Layout basics</h2><p>Unlike the desktop version, the mobile version has a slightly different UI meant to better fit the constrained screens of a mobile phone.</p><p>Here is a non-exhaustive list of differences between the desktop version and the mobile one:</p><ul><li>The <a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a> is displayed as a sidebar. To display the sidebar, press the button in the top-left of the screen.<ul><li>There is also a swipe gesture that can be done from the left of the screen, but the browser's navigation gesture interferes with it most of the time (depending on the platform).</li><li>Press and hold a note to display the <a class=\"reference-link\" href=\"#root/_help_YtSN43OrfzaA\">Note tree contextual menu</a>.</li></ul></li><li>The <a class=\"reference-link\" href=\"#root/_help_Ms1nauBra7gq\">Quick search</a> bar is also displayed at the top of the note tree.</li><li>The full <a class=\"reference-link\" href=\"#root/_help_eIg8jdvaoNNd\">Search</a> function can be triggered either from either the <a class=\"reference-link\" href=\"#root/_help_x3i7MxGccDuM\">Global menu</a> or from the <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a>, if configured.</li><li>The <a class=\"reference-link\" href=\"#root/_help_x3i7MxGccDuM\">Global menu</a> is shorter: <em>Open new window</em> and <em>Show cheatsheet</em> are left out, and <em>Switch to desktop version</em> is under <em>Advanced</em>.</li><li>The <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a> is displayed at the bottom of the screen.<ul><li>The launch bar uses a different configuration for icons than the desktop version. See the dedicated page for more information on how to configure it.</li></ul></li><li>Most of the note-related actions are grouped in the horizontal dots icon on the top-right of the note.</li><li>In a text note, the formatting toolbar sits at the bottom of the screen as a single row that scrolls sideways. It is shown only while you are editing the text, and hides when you hide the keyboard or move to another field, such as the note title. It starts with <em>Undo</em> and <em>Redo</em>, since the on-screen keyboard has no keys for them. While the cursor is in a table, an image, a code block or another element that has a toolbar of its own on desktop, a button with that element's icon follows them; it replaces the formatting toolbar with the element's toolbar, which has a back button at its start and goes away when the cursor leaves the element. The <span class=\"tn-icon cke cke-plus\"></span> button after them opens insertions as tiles at the bottom of the screen: code block, block quote and admonition (also in the block type button), then the less common collapsible, tabs, columns, horizontal line, page break, footnote, math, drawing canvas, Mermaid diagram, bookmark, link and content embeds, special characters, emoji, icon, date/time, template and Markdown import. The tiles marked with <span class=\"tn-icon bx bx-chevron-right\"></span> open a list of choices: <em>Code block</em> the language, <em>Admonition</em> its type, <em>Columns</em> the number of columns, <em>Footnote</em> a new footnote or a reference to an existing one, <em>Date/time</em> the format of the date and time, and <em>Insert text snippet</em> the template to insert, which is grayed out while there are none. The block type button shows the type of the current block as an icon rather than its name, and opens the block types as tiles at the bottom of the screen, with the current one highlighted: paragraph and heading 2 to 6, then bulleted list, numbered list and to-do list, then code block, block quote and admonition. Picking a paragraph or a heading in a list turns the item back into plain text, and the same goes for a code block. Block quote and admonition wrap the current block rather than replace it, so they are highlighted alongside it; pick one again to remove it. Typing <code>-</code> , <code>1.</code> or <code>[ ]</code> at the start of a line also starts a list. The style of a list (such as roman numerals) and its start number can only be changed on desktop. The <span class=\"tn-icon cke cke-trilium-ai\"></span> AI assistant button, shown once a provider is configured, opens its quick actions as a menu at the bottom of the screen, with <em>Ask AI…</em> at its top. The alignment button shows the alignment of the current block, and opens left, center, right and justify as a row of tiles, with the current one highlighted. The <span class=\"tn-icon cke cke-paper-clip\"></span> button replaces the separate image upload and attach file buttons: it opens <em>Image</em>, <em>Camera</em>, <em>Attach and embed file</em> and <em>Attach file as a link</em> as a row of tiles. <em>Camera</em> opens the device's camera and inserts the photo taken; the others open the device's file picker. The <span class=\"tn-icon cke cke-table\"></span> table button opens common table sizes as tiles. The <span class=\"tn-icon cke cke-arrow-up\"></span> and <span class=\"tn-icon cke cke-arrow-down\"></span> buttons after the indentation buttons move the current block, or the selected blocks, up or down, as <kbd>Alt</kbd>+<kbd>↑</kbd> and <kbd>Alt</kbd>+<kbd>↓</kbd> do on a keyboard. Inside a table they move the row instead.<ul><li>The formatting applied to text (bold, italic, underline, strikethrough, inline code, superscript and subscript, keyboard shortcut, font size and colors, and removing formatting) is on a row of its own, which ends with <span class=\"tn-icon cke cke-trilium-scissors\"></span> to cut the selection into a sub-note. Tap <span class=\"tn-icon cke cke-text\"></span> next to the block type button to show it, and <span class=\"tn-icon cke cke-previous-arrow\"></span> at its start to return to the main row. Selecting text shows this row on its own, and it goes back to the main row once the selection is gone (for example as you start typing), unless you opened or closed the row yourself in the meantime. The font size button opens the list of sizes as a menu at the bottom of the screen, each drawn at its size, with the current one checked. A single color button replaces the separate text and background color buttons: it opens a menu with a row of colors for the text and one for its background, each with a cell that removes the color and one that opens the device's color picker.</li></ul></li><li>While the on-screen keyboard is open, a <span class=\"tn-icon bx bxs-keyboard\"></span> button in the bottom-right corner, just above the keyboard, hides it. In a text note, the button is at the right end of the formatting toolbar. While a menu of the formatting toolbar is open in place of the keyboard, the button becomes a <span class=\"tn-icon bx bx-x\"></span>, which closes the menu and brings the keyboard back. This works in every note type and in every text field, and is the only way to hide the keyboard in the iOS app, where the keyboard has no <em>Done</em> button.</li><li>The <a class=\"reference-link\" href=\"#root/_help_3seOhtN8uLIY\">Tabs</a> are grouped under a tab switcher in the <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a>, where the tabs are displayed in a full-screen grid with preview for easy switching, as well as additional options such as reopening closed tabs.</li><li>Since v0.100.0, <a class=\"reference-link\" href=\"#root/_help_luNhaphA37EO\">Split View</a> can also be used in mobile view, but with a maximum of two panes at once. The splits are displayed vertically instead of horizontally.</li></ul><h2>Installing as a PWA</h2><p>The mobile view can be set up as a PWA. While this does not offer any offline capabilities, it will display the application in full-screen and makes it easy to access via your mobile phone's home screen.</p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\"><span class=\"tn-icon bx bxl-apple\"></span> iOS with Safari</p><div class=\"trilium-tab-panel\"><ol><li>Open your default web browser and access your Trilium instance.</li><li>Login.</li><li>Press the […] button in the bottom-right of the screen and select Share.</li><li>Scroll down to reveal the full list of items and choose <em>Add to Home Screen</em>.</li><li>Press <em>Add</em> and the web app will be available.</li></ol></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\"><span class=\"tn-icon bx bxl-chrome\"></span> Android with Google Chrome</p><div class=\"trilium-tab-panel\"><aside class=\"admonition important\"><p>Google Chrome requires the server to be served over HTTPS in order to display in full-screen. If using HTTP, the app will appear like a normal web page (similar to a bookmark).</p></aside><ol><li>Open your default web browser and access your Trilium instance.</li><li>Login.</li><li>Press the three vertical dots icon in the top-right of the screen and select <em>Add to Home screen.</em></li><li>Select the <em>Install</em> option.</li><li>Select an appropriate name.</li><li>The web app will appear as an application, not on the home screen.</li></ol></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">Android with Brave</p><div class=\"trilium-tab-panel\"><aside class=\"admonition important\"><p>Brave requires the server to be served over HTTPS in order to display in full-screen. If using HTTP, the app will appear like a normal web page (similar to a bookmark).</p></aside><ol><li>Open your default web browser and access your Trilium instance.</li><li>Login.</li><li>Press the three vertical dots icon in the bottom-right of the screen and select <em>Add to Home screen</em>.</li><li>Press the <em>Install</em> option.</li><li>The web app will appear as an application, not on the home screen.</li></ol></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">Samsung Browser</p><div class=\"trilium-tab-panel\"><ol><li>Open your default web browser and access your Trilium instance.</li><li>Login.</li><li>Press the hamburger menu in the bottom-right of the screen.</li><li>Select <em>Add to</em>, followed by <em>Home screen</em>.</li><li>Press <em>Add</em> and the web app will appear on the home page.</li></ol></div></section></div><h2>Sharing to Trilium</h2><p>Once installed as a PWA on Android, Trilium appears in the system's share menu, so links, text, images and other files can be sent to it from other apps. Shared content is saved to the <a class=\"reference-link\" href=\"#root/_help_S0Fos78ZfcY7\">Note Inbox</a>, and Trilium opens the note it created:</p><ul><li>Text or a link becomes a text note. A shared link is also stored in the <code>#pageUrl</code> label.</li><li>A single file becomes an image note or a file note, placed directly in the inbox.</li><li>Several files, or files shared together with text, are placed under a new text note that holds the text.</li></ul><p>Every note created this way carries the <code>#clipType=share</code> label, which gives a shared text note the <span class=\"tn-icon bx bx-share\"></span> icon unless the note has an <code>#iconClass</code> of its own. A single share can carry at most 20 files.</p><aside class=\"admonition note\"><p>Sharing requires being logged in. If the session has expired, log in again and share once more.</p></aside><h2>Testing via the desktop application</h2><p>If you are running Trilium without a dedicated <a href=\"#root/_help_WOcw2SLH6tbX\">server installation</a>, you can still test the mobile application using the desktop application. For more information, see <a class=\"reference-link\" href=\"#root/_help_nRqcgfTb97uV\">Using the desktop application as a server</a>. To access it go to <code>http://<ip>:37840/login?mobile</code> .</p><h2>Forcing mobile/desktop frontend</h2><p>Trilium decides automatically whether to use mobile or desktop front-end. If this is not appropriate, you can use <code>?mobile</code> or <code>?desktop</code> query param on <strong>login</strong> page (Note: you might need to log out).</p><p>Alternatively, simply select <em>Switch to mobile version</em> in the <a class=\"reference-link\" href=\"#root/_help_x3i7MxGccDuM\">Global menu</a>. In the mobile version, select <em>Advanced</em> → <em>Switch to desktop version</em> there instead.</p><h2>Scripting</h2><p>You can alter the behavior with <a class=\"reference-link\" href=\"#root/_help_CdNpE2pqjmI6\">Scripting</a>, just like for normal frontend. For script notes to be executed, they need to have labeled <code>#run=mobileStartup</code>.</p><p>Custom <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a> widgets are also supported.</p>",+ "_help_RDslemsQ6gCp": "<figure class=\"image image-style-align-right image_resized\" style=\"width:33.52%;\"><img style=\"aspect-ratio:1242/2688;\" src=\"{{helpAssets}}/User%20Guide/Installation%20%26%20Setup/Mobile%20Frontend_IMG_1765.PNG\" width=\"1242\" height=\"2688\"></figure><p>Trilium has a mobile web frontend which is optimized for touch based devices - smartphones and tablets. It is activated automatically during login process based on browser detection.</p><p>Mobile frontend is limited in features compared to the full desktop version. See below for more details on this.</p><h2>Layout basics</h2><p>Unlike the desktop version, the mobile version has a slightly different UI meant to better fit the constrained screens of a mobile phone.</p><p>Here is a non-exhaustive list of differences between the desktop version and the mobile one:</p><ul><li>The <a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a> is displayed as a sidebar. To display the sidebar, press the button in the top-left of the screen.<ul><li>There is also a swipe gesture that can be done from the left of the screen, but the browser's navigation gesture interferes with it most of the time (depending on the platform).</li><li>Press and hold a note to display the <a class=\"reference-link\" href=\"#root/_help_YtSN43OrfzaA\">Note tree contextual menu</a>.</li></ul></li><li>The <a class=\"reference-link\" href=\"#root/_help_Ms1nauBra7gq\">Quick search</a> bar is also displayed at the top of the note tree.</li><li>The full <a class=\"reference-link\" href=\"#root/_help_eIg8jdvaoNNd\">Search</a> function can be triggered either from either the <a class=\"reference-link\" href=\"#root/_help_x3i7MxGccDuM\">Global menu</a> or from the <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a>, if configured.</li><li>The <a class=\"reference-link\" href=\"#root/_help_x3i7MxGccDuM\">Global menu</a> is shorter: <em>Open new window</em> and <em>Show cheatsheet</em> are left out, and <em>Switch to desktop version</em> is under <em>Advanced</em>.</li><li>The <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a> is displayed at the bottom of the screen.<ul><li>The launch bar uses a different configuration for icons than the desktop version. See the dedicated page for more information on how to configure it.</li></ul></li><li>Most of the note-related actions are grouped in the horizontal dots icon on the top-right of the note.</li><li>In a text note, the formatting toolbar sits at the bottom of the screen as a single row that scrolls sideways. It is shown only while you are editing the text, and hides when you hide the keyboard or move to another field, such as the note title. It starts with <em>Undo</em> and <em>Redo</em>, since the on-screen keyboard has no keys for them. While the cursor is in a table, an image, a code block or another element that has a toolbar of its own on desktop, a button with that element's icon follows them; it replaces the formatting toolbar with the element's toolbar, which has a back button at its start and goes away when the cursor leaves the element. Its buttons with a list of choices, such as the column and row actions of a table, open that list as a menu at the bottom of the screen. The <span class=\"tn-icon cke cke-plus\"></span> button after them opens insertions as tiles at the bottom of the screen: code block, block quote and admonition (also in the block type button), then the less common collapsible, tabs, columns, horizontal line, page break, footnote, math, drawing canvas, Mermaid diagram, bookmark, link and content embeds, special characters, emoji, icon, date/time, template and Markdown import. The tiles marked with <span class=\"tn-icon bx bx-chevron-right\"></span> open a list of choices: <em>Code block</em> the language, <em>Admonition</em> its type, <em>Columns</em> the number of columns, <em>Footnote</em> a new footnote or a reference to an existing one, <em>Date/time</em> the format of the date and time, and <em>Insert text snippet</em> the template to insert, which is grayed out while there are none. The block type button shows the type of the current block as an icon rather than its name, and opens the block types as tiles at the bottom of the screen, with the current one highlighted: paragraph and heading 2 to 6, then bulleted list, numbered list and to-do list, then code block, block quote and admonition. Picking a paragraph or a heading in a list turns the item back into plain text, and the same goes for a code block. Block quote and admonition wrap the current block rather than replace it, so they are highlighted alongside it; pick one again to remove it. Typing <code>-</code> , <code>1.</code> or <code>[ ]</code> at the start of a line also starts a list. The style of a list (such as roman numerals) and its start number can only be changed on desktop. The <span class=\"tn-icon cke cke-trilium-ai\"></span> AI assistant button, shown once a provider is configured, opens its quick actions as a menu at the bottom of the screen, with <em>Ask AI…</em> at its top. The alignment button shows the alignment of the current block, and opens left, center, right and justify as a row of tiles, with the current one highlighted. The <span class=\"tn-icon cke cke-paper-clip\"></span> button replaces the separate image upload and attach file buttons: it opens <em>Image</em>, <em>Camera</em>, <em>Attach and embed file</em> and <em>Attach file as a link</em> as a row of tiles. <em>Camera</em> opens the device's camera and inserts the photo taken; the others open the device's file picker. The <span class=\"tn-icon cke cke-table\"></span> table button opens common table sizes as tiles. The <span class=\"tn-icon cke cke-arrow-up\"></span> and <span class=\"tn-icon cke cke-arrow-down\"></span> buttons after the indentation buttons move the current block, or the selected blocks, up or down, as <kbd>Alt</kbd>+<kbd>↑</kbd> and <kbd>Alt</kbd>+<kbd>↓</kbd> do on a keyboard. Inside a table they move the row instead.<ul><li>The formatting applied to text (bold, italic, underline, strikethrough, inline code, superscript and subscript, keyboard shortcut, font size and colors, and removing formatting) is on a row of its own, which ends with <span class=\"tn-icon cke cke-trilium-scissors\"></span> to cut the selection into a sub-note. Tap <span class=\"tn-icon cke cke-text\"></span> next to the block type button to show it, and <span class=\"tn-icon cke cke-previous-arrow\"></span> at its start to return to the main row. Selecting text shows this row on its own, and it goes back to the main row once the selection is gone (for example as you start typing), unless you opened or closed the row yourself in the meantime. The font size button opens the list of sizes as a menu at the bottom of the screen, each drawn at its size, with the current one checked. A single color button replaces the separate text and background color buttons: it opens a menu with a row of colors for the text and one for its background, each with a cell that removes the color and one that opens the device's color picker.</li></ul></li><li>While the on-screen keyboard is open, a <span class=\"tn-icon bx bxs-keyboard\"></span> button in the bottom-right corner, just above the keyboard, hides it. In a text note, the button is at the right end of the formatting toolbar. While a menu of the formatting toolbar is open in place of the keyboard, the button becomes a <span class=\"tn-icon bx bx-x\"></span>, which closes the menu and brings the keyboard back. This works in every note type and in every text field, and is the only way to hide the keyboard in the iOS app, where the keyboard has no <em>Done</em> button.</li><li>The <a class=\"reference-link\" href=\"#root/_help_3seOhtN8uLIY\">Tabs</a> are grouped under a tab switcher in the <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a>, where the tabs are displayed in a full-screen grid with preview for easy switching, as well as additional options such as reopening closed tabs.</li><li>Since v0.100.0, <a class=\"reference-link\" href=\"#root/_help_luNhaphA37EO\">Split View</a> can also be used in mobile view, but with a maximum of two panes at once. The splits are displayed vertically instead of horizontally.</li></ul><h2>Installing as a PWA</h2><p>The mobile view can be set up as a PWA. While this does not offer any offline capabilities, it will display the application in full-screen and makes it easy to access via your mobile phone's home screen.</p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\"><span class=\"tn-icon bx bxl-apple\"></span> iOS with Safari</p><div class=\"trilium-tab-panel\"><ol><li>Open your default web browser and access your Trilium instance.</li><li>Login.</li><li>Press the […] button in the bottom-right of the screen and select Share.</li><li>Scroll down to reveal the full list of items and choose <em>Add to Home Screen</em>.</li><li>Press <em>Add</em> and the web app will be available.</li></ol></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\"><span class=\"tn-icon bx bxl-chrome\"></span> Android with Google Chrome</p><div class=\"trilium-tab-panel\"><aside class=\"admonition important\"><p>Google Chrome requires the server to be served over HTTPS in order to display in full-screen. If using HTTP, the app will appear like a normal web page (similar to a bookmark).</p></aside><ol><li>Open your default web browser and access your Trilium instance.</li><li>Login.</li><li>Press the three vertical dots icon in the top-right of the screen and select <em>Add to Home screen.</em></li><li>Select the <em>Install</em> option.</li><li>Select an appropriate name.</li><li>The web app will appear as an application, not on the home screen.</li></ol></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">Android with Brave</p><div class=\"trilium-tab-panel\"><aside class=\"admonition important\"><p>Brave requires the server to be served over HTTPS in order to display in full-screen. If using HTTP, the app will appear like a normal web page (similar to a bookmark).</p></aside><ol><li>Open your default web browser and access your Trilium instance.</li><li>Login.</li><li>Press the three vertical dots icon in the bottom-right of the screen and select <em>Add to Home screen</em>.</li><li>Press the <em>Install</em> option.</li><li>The web app will appear as an application, not on the home screen.</li></ol></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">Samsung Browser</p><div class=\"trilium-tab-panel\"><ol><li>Open your default web browser and access your Trilium instance.</li><li>Login.</li><li>Press the hamburger menu in the bottom-right of the screen.</li><li>Select <em>Add to</em>, followed by <em>Home screen</em>.</li><li>Press <em>Add</em> and the web app will appear on the home page.</li></ol></div></section></div><h2>Sharing to Trilium</h2><p>Once installed as a PWA on Android, Trilium appears in the system's share menu, so links, text, images and other files can be sent to it from other apps. Shared content is saved to the <a class=\"reference-link\" href=\"#root/_help_S0Fos78ZfcY7\">Note Inbox</a>, and Trilium opens the note it created:</p><ul><li>Text or a link becomes a text note. A shared link is also stored in the <code>#pageUrl</code> label.</li><li>A single file becomes an image note or a file note, placed directly in the inbox.</li><li>Several files, or files shared together with text, are placed under a new text note that holds the text.</li></ul><p>Every note created this way carries the <code>#clipType=share</code> label, which gives a shared text note the <span class=\"tn-icon bx bx-share\"></span> icon unless the note has an <code>#iconClass</code> of its own. A single share can carry at most 20 files.</p><aside class=\"admonition note\"><p>Sharing requires being logged in. If the session has expired, log in again and share once more.</p></aside><h2>Testing via the desktop application</h2><p>If you are running Trilium without a dedicated <a href=\"#root/_help_WOcw2SLH6tbX\">server installation</a>, you can still test the mobile application using the desktop application. For more information, see <a class=\"reference-link\" href=\"#root/_help_nRqcgfTb97uV\">Using the desktop application as a server</a>. To access it go to <code>http://<ip>:37840/login?mobile</code> .</p><h2>Forcing mobile/desktop frontend</h2><p>Trilium decides automatically whether to use mobile or desktop front-end. If this is not appropriate, you can use <code>?mobile</code> or <code>?desktop</code> query param on <strong>login</strong> page (Note: you might need to log out).</p><p>Alternatively, simply select <em>Switch to mobile version</em> in the <a class=\"reference-link\" href=\"#root/_help_x3i7MxGccDuM\">Global menu</a>. In the mobile version, select <em>Advanced</em> → <em>Switch to desktop version</em> there instead.</p><h2>Scripting</h2><p>You can alter the behavior with <a class=\"reference-link\" href=\"#root/_help_CdNpE2pqjmI6\">Scripting</a>, just like for normal frontend. For script notes to be executed, they need to have labeled <code>#run=mobileStartup</code>.</p><p>Custom <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a> widgets are also supported.</p>","_help_MtPxeAWVAzMg": "<p><img src=\"{{helpAssets}}/User%20Guide/Installation%20%26%20Setup/Web%20Clipper_image.png\"></p><p>Trilium Web Clipper is a web browser extension which allows user to clip text, screenshots, whole pages and short notes and save them directly to Trilium Notes.</p><h2>Supported browsers</h2><p>Trilium Web Clipper officially supports the following web browsers:</p><ul><li>Mozilla Firefox, using Manifest v2.</li><li>Google Chrome, using Manifest v3. Theoretically the extension should work on other Chromium-based browsers as well, but they are not officially supported.</li></ul><h2>Obtaining the extension</h2><p>The extension is available from the official browser web stores:</p><ul><li><strong>Firefox</strong>: <a href=\"https://addons.mozilla.org/firefox/addon/trilium-notes-web-clipper/\">Trilium Web Clipper on Firefox Add-ons</a></li><li><strong>Chrome</strong>: <a href=\"https://chromewebstore.google.com/detail/trilium-web-clipper/ofoiklieachadcaeffficgjaajojpkpi\">Trilium Web Clipper on Chrome Web Store</a></li></ul><h2>Functionality</h2><ul><li>select text and clip it with the right-click context menu</li><li>click on an image or link and save it through context menu</li><li>save whole page from the popup or context menu</li><li>save a PDF that the browser shows, as a file note</li><li>save a screenshot of an area you select, of the visible part of the page or of the whole page, from either popup or context menu</li><li>create short text note from popup</li></ul><h2>The popup</h2><p>Clicking the extension's button in the browser toolbar opens its popup:</p><ul><li><p>The popup shows what will be saved from the current page: the note's title, which can be edited before saving, the website, and below them a preview, which starts with a box for your own note and the page's description. A switch above the preview chooses what to save, among what the page offers:</p><ul><li><em>Selection</em>, when text is selected on the page: <em>Save selection</em> saves it into the note of that page's clippings, as the context menu does.</li><li><em>Page</em>: <em>Save page to Trilium</em> saves the page's text and images. A smaller switch at the top of the preview chooses how much of the page to keep: <em>Article</em> keeps only the page's main text, without its menus, sidebars and footers, and <em>Whole page</em> keeps everything the page shows. <em>Whole page</em> is for pages that are not an article (such as a gallery or a page of cards), where <em>Article</em> can leave out part of the content; the preview shows what each one keeps. <em>Article</em> is unavailable on a page where Trilium finds no article. The author the page names shows under the description, marked by the <span class=\"tn-icon bx bx-user\"></span> icon. It can be edited or cleared before saving, or written in when the page names none, and is saved in the <code>#pageAuthor</code> label of the note. When the page states when it was published, that date shows under the author, marked by the <span class=\"tn-icon bx bx-calendar\"></span> icon, and is saved in the <code>#publishedDate</code> label of the note. When it states when it was last modified, that date shows below, marked by the <span class=\"tn-icon bx bx-history\"></span> icon, and is saved in the <code>#modifiedDate</code> label.</li><li><em>PDF</em>, when the tab shows a PDF in the browser's viewer: <em>Save PDF to Trilium</em> downloads the PDF and saves it as a file note, which Trilium opens in its <a class=\"reference-link\" href=\"#root/_help_XJGJrpu7F9sh\">PDFs</a> viewer. Only the title and the description can be edited, since a file note has no text of its own for your note. The page's address is saved in the note's <code>#pageUrl</code> label and the PDF's file name in <code>#originalFileName</code>. Saving a PDF needs Trilium v0.107.0 or later.</li><li><em>Bookmark</em>, always: there is no preview, and <em>Save bookmark</em> saves a link to the page with your note as the content of the note. Left empty, the title stays the page's title.</li></ul><p>The box for your note, marked by the <span class=\"tn-icon bx bx-info-circle\"></span> icon, has the cursor when the popup opens, so a note (such as why the page is worth keeping) can be typed right away. It grows with its text, and keeps it when switching between <em>Selection</em>, <em>Page</em> and <em>Bookmark</em>. A note on a selection or a page is saved above the clipped content, in a <em>Note</em> admonition. Left empty, nothing is added. <kbd>Ctrl</kbd>+<kbd>Enter</kbd> in any of the popup's fields saves, whichever is chosen.</p><p>The description, marked by the <span class=\"tn-icon bx bx-align-left\"></span> icon, comes from the page's <code>description</code> meta tag, or the one it gives social sites. It can be edited or cleared before saving, or written in when the page has none, and is saved in the <code>#pageDescription</code> label of the note. Clippings saved with the keyboard shortcuts or the context menu, screenshots and images included, get the description as the page gives it. Each clipping that brings a description updates the label. The description, the author and the dates are shown by clicking the <em>Web clip</em> badge next to the title of the note (see <a class=\"reference-link\" href=\"#root/_help_B5dihXRDksTk\">Note badges</a>).</p><p>The popup opens on the selection if there is one, otherwise on <em>Page</em>, showing the article, or the whole page when the page has no article. On a PDF, it opens on <em>PDF</em>. On a page that shows nothing to save, it opens on <em>Bookmark</em> and says so. The keyboard shortcuts and the context menu still save right away, without a preview: saving the whole page that way saves the article, the whole page when the page has no article, or the PDF when the tab shows one.</p></li><li><p>Pages the extension cannot access (the browser's own pages, the extension stores, and pages that were open before the extension was installed until they are reloaded) cannot be saved or captured, so the popup says so in place of the preview, and only <em>All tabs</em> remains available there.</p></li><li><p>Below the preview, a row of buttons offers the other actions: <em>Area</em> (a screenshot of an area you select), <em>Visible</em> (a screenshot of the visible part of the page), <em>Full page</em> (a screenshot of the whole page) and <em>All tabs</em> (saves the links of every tab in the current window as a list of <a class=\"reference-link\" href=\"#root/_help_UmgZAfcltxkS\">Link Previews</a>, or of plain links when <em>Autogenerate link previews</em> is turned off). Hovering over a button shows its full name and, if it has one, its keyboard shortcut.</p></li><li><p><em>Full page</em> scrolls through the page, takes a screenshot of each part and joins them into one image, then scrolls back to where the page was. The scrollbars are hidden while it does, so they do not appear in the image. Stay on the tab until it is saved: switching to another tab stops the screenshot. A header that stays at the top of the window appears once, at the top of the image, and headings that stick while scrolling appear where they are in the page. Other elements that stay in place while scrolling (such as cookie banners and chat buttons) are left out, while a background that fills the whole window repeats on every screen. In Firefox, the page is captured without scrolling through it, which is faster: such a background then appears only at the top, and images that the page loads only once they are scrolled into view can be missing. A long page is saved as several images, one below the other in the note. A page longer than 100 screens is cut off there, and the message after saving says so. Screenshots keep their full height in Trilium: <em>Resize image</em> (under <em>Automatically compress images</em> in Options → Media) limits only their width.</p></li><li><p>The popup stays open while Trilium saves, which can take a few seconds for a long page or a large PDF, and the other actions wait until it is done. The bar at the top of the popup then says, in green, that the clipping was saved (in place of the notice that the page was already clipped), with <em>Open note</em> to open it in Trilium (and, after <em>All tabs</em>, <em>Close saved tabs</em>), or, in red, why it could not be saved. The same clipping cannot be saved twice by accident: the save button stays disabled until another mode is chosen. <em>Crop</em> is the exception: the popup closes so that an area of the page can be selected, and the notification on the page reports the outcome.</p></li><li><p>If the current page was already clipped, a notice at the top offers to open the note in Trilium.</p></li><li><p>If Trilium cannot be found, the popup explains why instead of showing the actions, with buttons to look for Trilium again and to open the options.</p></li><li><p>The bottom of the popup shows whether the extension is connected to Trilium, as a colored dot (green when connected, amber when the versions are not compatible, red when Trilium was not found) next to a description of the connection, followed by the buttons for the extension's options and for this help page. A button to check the connection again appears next to them when hovering over the bar, and stays visible while Trilium cannot be reached or is not compatible.</p></li></ul><h2>Location of clippings</h2><p>Trilium will save these clippings as a new child note under a \"clipper inbox\" note.</p><p>By default, that's the <a class=\"reference-link\" href=\"#root/_help_l0tKav7yLHGF\">Day Notes</a> but you can override that by setting the <a href=\"#root/_help_zEY4DaJG4YT5\">label</a> <code>clipperInbox</code>, on any other note.</p><p>Further clippings of the same kind from the same page are added to the note created by the first one, even on a later day or after that note was moved out of the clipper inbox. The note stays where it is and is not cloned back into the inbox. A PDF is the exception: each save creates a new file note, since the PDF can have changed since it was last saved.</p><p>The icon of a clipped note shows what was saved:</p><ul><li><span class=\"tn-icon bx bx-paperclip\"></span> a selection, a screenshot or a link from the context menu;</li><li><span class=\"tn-icon bx bx-globe\"></span> a page (<em>Article</em> or <em>Whole page</em>);</li><li><span class=\"tn-icon bx bx-bookmark\"></span> a bookmark;</li><li><span class=\"tn-icon bx bx-window-alt\"></span> the tabs of a window.</li></ul><p>The icon is derived from the note's <code>#clipType</code> label, so setting an <code>#iconClass</code> label on the note replaces it. A saved PDF has the icon of a PDF file, like any other PDF in Trilium.</p><h2>Embedded videos</h2><p>A YouTube video embedded in a clipped page is saved as a <a class=\"reference-link\" href=\"#root/_help_UmgZAfcltxkS\">Link Previews</a> embed, with the video's title and thumbnail. As with a link preview added in the editor, the video plays only when clicked. Other embedded content (such as videos from other websites) is not saved.</p><p>The popup's preview shows each such video as a chip with the YouTube icon and the video's short link, and leaves out the embedded content that will not be saved.</p><h2>Keyboard shortcuts</h2><p>Keyboard shortcuts are available for most functions:</p><ul><li>Save selected text: <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>S</kbd> (Mac: <kbd>⌘</kbd>+<kbd>⇧</kbd>+<kbd>S</kbd>)</li><li>Save whole page: <kbd>Alt</kbd>+<kbd>Shift</kbd>+<kbd>S</kbd> (Mac: <kbd>⌥</kbd>+<kbd>⇧</kbd>+<kbd>S</kbd>)</li><li>Save a screenshot of an area: <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>E</kbd> (Mac: <kbd>⌘</kbd>+<kbd>⇧</kbd>+<kbd>E</kbd>)</li><li>Save all tabs of the current window: no default shortcut, but one can be assigned as described below.</li><li>Save a screenshot of the whole page: no default shortcut, but one can be assigned as described below.</li></ul><p>To set custom shortcuts, follow the directions for your browser.</p><ul><li><strong>Firefox</strong>: <code>about:addons</code> → Gear icon ⚙️ → Manage extension shortcuts</li><li><strong>Chrome</strong>: <code>chrome://extensions/shortcuts</code></li></ul><aside class=\"admonition note\"><p>On Firefox, the default shortcuts interfere with some browser features. As such, the keyboard combinations will not trigger the Web Clipper action. To fix this, simply change the keyboard shortcut to something that works. The defaults will be adjusted in future versions.</p></aside><h2>Configuration</h2><p>The extension needs to connect to a running Trilium instance. By default, it looks for the desktop application on port 37840 of the local computer. If the desktop application runs on a different port (for example because it was started with the <code>TRILIUM_PORT</code> environment variable), enter that port in the extension's options. The extension checks for Trilium again every minute, or right away when pressing the refresh button at the bottom of its popup.</p><p>It's also possible to configure the <a href=\"#root/_help_WOcw2SLH6tbX\">server</a> address if you don't run the desktop application, or want it to work without the desktop application running.</p><p>To connect to a server, enter its address and your password in the extension's options and press <em>Login to the server instance</em>. If the server uses <a href=\"#root/_help_7DAiwaf8Z7Rz\">multi-factor authentication</a>, also fill in <em>Authentication code</em> with the current code from your authenticator app (or one of your recovery codes); otherwise leave it empty. The password and the code are used only once, to obtain a token for the extension, and are not stored.</p><h3>When a clipping fails</h3><p>After each clipping made with a keyboard shortcut or the context menu, a notification in the corner of the page confirms that it was saved, with a link to open the new note in Trilium. A clipping made from the popup reports in the popup instead, unless the popup was closed before it was saved. If the clipping could not be saved, the message says why instead:</p><ul><li>Trilium was not found: start the desktop application, or check the server address and token in the extension's options.</li><li>The versions of Trilium and the extension are not compatible: update the one the message names.</li><li>Trilium rejected the request: the message includes the reason Trilium gave.</li><li>The popup could not reach the extension's background script, or it gave no answer: close the popup and open it again. If the extension was just updated or reloaded, reload the page as well.</li><li>A PDF could not be saved: Trilium is older than v0.107.0, the website refused to send the PDF again, or the PDF is larger than 100 MB. The extension downloads the PDF with the browser's cookies for that website, so a PDF behind a login can be saved while you are logged in.</li></ul><p>The extension downloads the images of a clipping itself, so that they are stored in Trilium together with the note. If some of them cannot be downloaded (for example because the website refuses the request), the clipping is still saved, and the notification says how many images are missing. Those images keep their address on the original website: Trilium tries to download them once more if <em>Download images automatically</em> is enabled in <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Media</em>, and otherwise the note shows them from the website for as long as it serves them.</p><p>The notification is shown on the page itself, so it does not appear on pages where extensions cannot run (such as the browser's own settings pages, the extension stores and Firefox's PDF viewer). A clipping saved from the popup on such a page still reports in the popup.</p><h2>Testing development versions</h2><p>Development versions are version pre-release versions, generally meant for testing purposes. These are not available in the Google or Firefox web stores, but can be downloaded from either:</p><ul><li><a href=\"https://github.com/TriliumNext/Trilium/releases\">GitHub Releases</a> by looking for releases starting with <em>Web Clipper.</em></li><li>Artifacts in GitHub Actions, by looking for the <a href=\"https://github.com/TriliumNext/Trilium/actions/workflows/web-clipper.yml\"><em>Deploy web clipper extension</em> workflow</a>. Once a workflow run is selected, the ZIP files are available in the <em>Artifacts</em> section, under the name <code>web-clipper-extension</code>.</li></ul><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\"><span class=\"tn-icon bx bxl-chrome\"></span> Chrome</p><div class=\"trilium-tab-panel\"><ol><li>Download <code>trilium-web-clipper-[x.y.z]-chrome.zip</code>.</li><li>Extract the archive.</li><li>In Chrome, navigate to <code>chrome://extensions/</code></li><li>Toggle <em>Developer Mode</em> in top-right of the page.</li><li>Press the <em>Load unpacked</em> button near the header.</li><li>Point to the extracted directory from step (2).</li></ol></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\"><span class=\"tn-icon bx bxl-firefox\"></span> Firefox</p><div class=\"trilium-tab-panel\"><aside class=\"admonition warning\"><p>Firefox prevents installation of unsigned packages in the “retail” version. To be able to install extensions from disk, consider using <em>Firefox Developer Edition</em> or a non-branded version of Firefox (e.g. <em>GNU IceCat</em>).</p><p>One time, go to <code>about:config</code> and change <code>xpinstall.signatures.required</code> to <code>false</code>.</p></aside><ol><li>Navigate to <code>about:addons</code>.</li><li>Select <em>Extensions</em> in the left-side navigation.</li><li>Press the <em>Gear</em> icon on the right of the <em>Manage Your Extensions</em> title.</li><li>Select <em>Install Add-on From File…</em></li><li>Point it to <code>trilium-web-clipper-[x.y.z]-firefox.zip</code>.</li><li>Press the <em>Add</em> button to confirm.</li></ol></div></section></div><h2>Credits</h2><p>Some parts of the code are based on the <a href=\"https://github.com/laurent22/joplin/tree/master/Clipper\">Joplin Notes browser extension</a>.</p>","_help_n1lujUxCwipy": "<p>This document outlines the steps required to upgrade Trilium to a new release version.</p><h2>How to Upgrade</h2><p>Trilium does not support built-in automatic upgrades; all updates must be performed manually. The upgrade process varies depending on the installation method:</p><ul><li><a href=\"#root/_help_rWX5eY045zbE\"><strong>Docker Server Installation</strong></a>: Pull the new image and restart the container.</li><li><strong>Other Installations</strong>: Download the latest version from the <a href=\"https://github.com/TriliumNext/Trilium/releases/latest\">release page</a> and replace the existing application files.</li></ul><h2>Database Compatibility and Migration</h2><p>Upon startup, Trilium will automatically migrate the <a href=\"#root/_help_wX4HbRucYSDD\">database</a> to the new version. Note that after migration, older versions of Trilium will be unable to read the database. If you need to revert to a previous version of Trilium and its database, you can restore the <a href=\"#root/_help_ODY7qQn5m2FT\">backup</a> that is created prior to migration.</p><h2>Sync Compatibility</h2><p>The <a href=\"#root/_help_cbkrhQjrkKrh\">synchronization</a> protocol used by Trilium is versioned, requiring all members of the sync cluster to use the same protocol version. Therefore, when upgrading to a new version, you may need to upgrade all instances in the sync cluster. Changes to the sync protocol version are typically indicated on the release page.</p>","_help_ODY7qQn5m2FT": "<p>Trilium supports simple backup scheme where it saves copy of the <a class=\"reference-link\" href=\"#root/_help_wX4HbRucYSDD\">Database</a> on these events:</p><ul><li>once a day</li><li>once a week</li><li>once a month</li><li>before DB migration to newer version</li></ul><p>So in total you'll have at most 4 backups from different points in time which should protect you from various problems. These backups are stored by default in <code>backup</code> directory placed in the <a href=\"#root/_help_tAassRL4RSQL\">data directory</a>.</p><p>This is only very basic backup solution, and you're encouraged to add some better backup solution - e.g. backing up the <a class=\"reference-link\" href=\"#root/_help_wX4HbRucYSDD\">Database</a> to cloud / different computer etc.</p><p>Note that <a class=\"reference-link\" href=\"#root/_help_cbkrhQjrkKrh\">Synchronization</a> provides also some backup capabilities by its nature of distributing the data to other computers.</p><h2>Creating a backup</h2><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\"><span class=\"tn-icon bx bx-desktop\"></span> On the desktop app & web client</p><div class=\"trilium-tab-panel\"><ol><li>Go to <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Backup</em> and press the <em>Backup now</em> button.</li><li>The backup creation process may take a few moments, especially for larger databases. A notification will inform you when the backup is complete.</li><li>The backup will be saved as <code>backup-now</code> in the <em>Existing backups</em> list, where you can download it.</li></ol></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\"><span class=\"tn-icon bx bx-globe\"></span> On the standalone client</p><div class=\"trilium-tab-panel\"><ol><li>Go to <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Backup</em> and press the <em>Download backup</em> button.</li><li>You will be prompted to restart the app. Confirm, and the app will restart automatically.</li><li>Set a <em>backup name</em> or <em>password</em> (both optional), then press <em>Continue</em>.</li><li>Press the <em>Generate and download</em> button and wait for the download to complete.</li><li>Once you confirm the download is saved on your device, press <em>Finish</em> to complete</li></ol></div></section></div><h2>Downloading a backup</h2><ul><li><strong>Desktop and web client</strong>: to download an existing backup, navigate to <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Backup</em> → <em>Existing backups</em> and select <em>Download</em> (<span class=\"tn-icon bx bx-download\"></span>).</li><li><strong>Standalone client</strong>: automatic backups are not supported in this version. You can manually create and download a backup by going to <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Backup</em> → <em>Download backup</em>.</li></ul><h2>Restoring a backup</h2><ul><li><strong>For a new Trilium instance</strong>: When setting up a new Trilium instance, use the <em>Restore from backup</em> option in the setup menu to guide you through restoring your existing backup.</li><li><strong>For an existing Trilium instance</strong>: To restore a backup and replace your current database, go to <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Backup</em> and click <em>Restore a backup</em>. You will be prompted to restart the app for the restoration process to begin. After restarting, you can choose to back up the existing database before overwriting it. Note: For the web client, use the Start Over feature ( <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Database</em> → <em>Start over</em> (<span class=\"tn-icon bx bx-reset\"></span>)) to switch to the setup screen and restore a backup.</li></ul><p>Next, select the backup file (.db or .tnbackup) from your device. The web client is optimized for handling large backups and is resilient to unstable network conditions, similar to the desktop application.</p><p>If your database is encrypted, you will be prompted to enter the password used for encrypting the backup file. Without the correct password, decryption and restoration cannot proceed.</p><p>Restoring a backup may take some time, depending on its size. Once it completes, Trilium will open the freshly restored database.</p><h3>The alternative way for restoring a backup</h3><p>Let's assume you want to restore the weekly backup (only in .db format, .tnbackup files are not supported by this method), here's how to do it:</p><ul><li>find <a href=\"#root/_help_tAassRL4RSQL\">data directory</a> Trilium uses - easy way is to open \"About Trilium Notes\" (<span class=\"tn-icon bx bx-info-circle\"></span>) from \"Menu\" in upper left corner and looking at \"data directory\"<ul><li>I'll refer to <code>~/trilium-data</code> as data directory from now on</li></ul></li><li>find <code>~/trilium-data/backup/backup-weekly.db</code> - this is the <a class=\"reference-link\" href=\"#root/_help_wX4HbRucYSDD\">Database</a> backup.</li><li>at this point stop/kill Trilium</li><li>delete <code>~/trilium-data/document.db</code>, <code>~/trilium-data/document.db-wal</code> and <code>~/trilium-data/document.db-shm</code> (latter two files are auto generated)</li><li>copy and rename this <code>~/trilium-data/backup/backup-weekly.db</code> to <code>~/trilium-data/document.db</code></li><li>make sure that the file is writable, e.g. with <code>chmod 600 document.db</code></li><li>start Trilium again</li></ul><aside class=\"admonition warning\"><p>If you have configured sync then you need to do it across all members of the sync cluster, otherwise older version (restored backup) of the document will be detected and synced to the newer version.</p></aside><h2>Changing the backup location in Trilium (desktop only)</h2><p>Starting with version 0.105, the Trilium desktop client allows users to change the directory where backups are stored. Follow these steps to specify a custom backup directory:</p><ol><li>Navigate to <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Backup</em> → <em>Backup location</em>.</li><li>Click the <em>Select location</em> button.</li><li>Choose any writable directory on your file system. This could include network shares, depending on your operating system.</li></ol><p>Once you set a custom directory, all manual and automatic backups will be saved there. If the selected directory becomes unavailable, backups may fail or revert to the default location.</p><aside class=\"admonition tip\"><p>For better privacy when using unsafe backup locations, you can enable backup encryption, which makes the backup file unreadable without the correct password.</p></aside><h2>Backup encryption</h2><p>Trilium can secure the entire content of the database backup, ensuring it remains unreadable unless the correct password is provided. This is particularly useful for storing backups in unsecured locations, like network shares, unencrypted external drives, or cloud services. </p><p>Encrypted database backups use the Trilium Backup Container (.tnbackup) format, which relies on AES-256-GCM. This authenticated encryption mode scrambles the data and generates a tag confirming it hasn't been altered. The password itself isn't directly used as the key; it's processed through scrypt, a key derivation function designed to be slow and memory-intensive, making brute-force password guessing difficult even with powerful hardware. Each backup also receives a random 16-byte salt, ensuring that the same password never produces the same encryption key twice. Additionally, critical metadata such as chunk order, length, and header flags are cryptographically bound into the encryption (via \"additional authenticated data\"), preventing undetected tampering like reorder, truncate, or splice operations.</p><h3>Enabling backup encryption</h3><p>To enable encryption for automatic backups in the Desktop application:</p><ol><li>Go to <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Backup</em> → <em>Backup options</em>.</li><li>Click on <em>Turn on encryption</em> and set a password.</li></ol><p>Once encryption is enabled, all newly created backups (both automatic and manual) will be encrypted with the specified password. Backups created prior to enabling encryption will remain unsecured.</p><p>You can change the password anytime using the <em>Change password</em> button. The new password will apply to backups created after the change.</p><p>To disable encryption, uncheck <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Backup</em> → <em>Enable encryption</em>.</p><aside class=\"admonition note\"><p>On some systems, a keyring may not be available for Trilium to securely store the encryption password. In such cases, the encryption option is disabled.</p></aside><h2>Backup compression</h2><p>Database backups can be optionally compressed to minimize storage footprint. This method is effective primarily when the database consists largely of text content. However, media files (images, videos, audio), along with PDF, ODF, and DOCX files, are already compressed in their original formats and won't benefit from further compression.</p><p>Compressed backups are stored using the Trilium Backup Container (.tnbackup), employing RFC 1952 GZIP compression.</p><aside class=\"admonition warning\"><p><strong>Note:</strong> Compression increases the time required for backup creation and restoration. It may also lead to higher CPU usage during automatic backups, potentially draining the battery faster on battery-powered devices. Enable this option only if necessary.</p></aside><h3>Enabling Backup Compression (Desktop Only)</h3><p>To enable compression for new automatic and manual backups, navigate to <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Backup</em> → <em>Backup options</em> and toggle <em>Enable compression</em> to on.</p><h2>Disabling backup</h2><p>Although this is not recommended, it is possible to disable backup in <code>config.ini</code> in the <a href=\"#root/_help_tAassRL4RSQL\">data directory</a>:</p><pre><code class=\"language-text-x-trilium-auto\">[General]\n... some other configs\n# set to true to disable backups (e.g. because of limited space on server)\nnoBackup=true</code></pre><p>You can also review the <a href=\"#root/_help_Gzjqa934BdH4\">configuration</a> file to provide all <code>config.ini</code> values as environment variables instead.</p><p>See <a href=\"https://github.com/TriliumNext/Trilium/blob/master/config-sample.ini\">sample config</a>.</p>",@@ -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 <a class=\"reference-link\" href=\"#root/_help_iPIMuisry3hd\">Text</a> notes which allows easily accessing commonly used commands simply by using the keyboard, without having to remember dedicated <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 <a class=\"reference-link\" href=\"#root/_help_pwc194wlRzcH\">Text Snippets</a> 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 & Language</em> → <em>Language & 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\\<language>\\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 <a class=\"reference-link\" href=\"#root/_help_jcQVxzYybYgz\">Note contextual menu</a> 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 <a class=\"reference-link\" href=\"#root/_help_2dcGDhp9WFKb\">Outline tab</a>.</p></aside>",- "_help_NdowYOC1GFKS": "<p>Tables are a powerful feature for <a class=\"reference-link\" href=\"#root/_help_iPIMuisry3hd\">Text</a> 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 <span class=\"tn-icon cke cke-table\"></span>button opens common sizes as tiles at the bottom of the screen, 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\"><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 <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 <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 <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 <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 <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 <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 <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 <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 <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 <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <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 <a class=\"reference-link\" href=\"#root/_help_AlJ73vBCjWDw\">Status bar</a> via the <span class=\"tn-icon bx bx-globe\"></span> icon, or else the default content language. See <a class=\"reference-link\" href=\"#root/_help_veGu4faJErEM\">Content language & 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 & drop and press the <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 <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 <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 <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 will come with a predefined gray border.</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 <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 <a class=\"reference-link\" href=\"#root/_help_iPIMuisry3hd\">Text</a> 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 <span class=\"tn-icon cke cke-table\"></span>button opens common sizes as tiles at the bottom of the screen, 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 <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 <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 <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 <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 <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 <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 <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 <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 <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 <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <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 <a class=\"reference-link\" href=\"#root/_help_AlJ73vBCjWDw\">Status bar</a> via the <span class=\"tn-icon bx bx-globe\"></span> icon, or else the default content language. See <a class=\"reference-link\" href=\"#root/_help_veGu4faJErEM\">Content language & 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 & drop and press the <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 <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 <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 <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 will come with a predefined gray border.</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 <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 <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 <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 <a class=\"reference-link\" href=\"#root/_help_OFXdgB2nNk1F\">Promoted Attributes</a> 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 <a class=\"reference-link\" href=\"#root/_help_nRhnJkTT8cPs\">Formatting toolbar</a>, by looking for the <span class=\"tn-icon cke cke-trilium-template\"></span> button.</li><li>Using <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. </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 <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\".</p><p>Task states are fully preserved when converting between <a class=\"reference-link\" href=\"#root/_help_iPIMuisry3hd\">Text</a> and <a class=\"reference-link\" href=\"#root/_help_6RM1Q7ppFVoj\">Markdown</a> 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 <a class=\"reference-link\" href=\"#root/_help_i16PM6A7GXdU\">Customizing to-do task states</a> 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 <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 <a class=\"reference-link\" href=\"#root/_help_CtBQqbwXDx1w\">Kanban Board</a> 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 <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 <a href=\"#root/_help_iPIMuisry3hd\">Text</a> notes, see <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 <span class=\"tn-icon bx bx-code\"></span> icon in the <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 <a class=\"reference-link\" href=\"#root/_help_RDslemsQ6gCp\">Mobile Frontend</a>, the same list is available in the <a class=\"reference-link\" href=\"#root/_help_8YBEPzcpUgxw\">Note menu</a> → <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. The supported languages can be adjusted by going to <a href=\"#root/_help_4TIF1oA4VQRO\">Options</a>, then <em>Code Notes</em> and looking for the <em>Available MIME types in the dropdown</em> section. Simply check any of the items to add them to the list, or un-check them to remove them from the list.</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 <a href=\"#root/_help_QxEyIjRBizuC\">Code blocks</a> feature of <a href=\"#root/_help_iPIMuisry3hd\">Text</a> notes.</p><h2>Word wrap</h2><p>Long lines can be displayed on multiple lines:</p><ul><li>Globally for all code notes, from <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Code Notes.</em></li><li>For a particular note, by going to the menu in <a class=\"reference-link\" href=\"#root/_help_8YBEPzcpUgxw\">Note menu</a> 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>Adjusting options using the status bar</h2><p>The status bar at the bottom of the editor shows the current indentation settings and language. 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 <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>Color schemes</h2><p>Since Trilium 0.94.0 the colors of code notes can be customized by going <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → 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 <a class=\"reference-link\" href=\"#root/_help_nBAXQFj20hS1\">Include Note</a>, on the cards of <a class=\"reference-link\" href=\"#root/_help_GTwFsgaA0lCt\">Collections</a> or in a tooltip, uses the same colors and shows 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>-></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 <a class=\"reference-link\" href=\"#root/_help_oI7GoyilXXAr\">Automatic replacements</a>), and copying it out gives you back <code>!=</code> and <code>-></code>.</p><p>This can be turned off with <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 <a class=\"reference-link\" href=\"#root/_help_6RM1Q7ppFVoj\">Markdown</a> 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/Installation & Setup/Mobile Frontend.md b/docs/User Guide/User Guide/Installation & Setup/Mobile Frontend.mdindex 65c0bbba3f..436c7aee4d 100644--- a/docs/User Guide/User Guide/Installation & Setup/Mobile Frontend.md+++ b/docs/User Guide/User Guide/Installation & Setup/Mobile Frontend.md@@ -20,7 +20,7 @@ Here is a non-exhaustive list of differences between the desktop version and the* The <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Launch%20Bar.md">Launch Bar</a> is displayed at the bottom of the screen.* The launch bar uses a different configuration for icons than the desktop version. See the dedicated page for more information on how to configure it.* Most of the note-related actions are grouped in the horizontal dots icon on the top-right of the note.-* In a text note, the formatting toolbar sits at the bottom of the screen as a single row that scrolls sideways. It is shown only while you are editing the text, and hides when you hide the keyboard or move to another field, such as the note title. It starts with _Undo_ and _Redo_, since the on-screen keyboard has no keys for them. While the cursor is in a table, an image, a code block or another element that has a toolbar of its own on desktop, a button with that element's icon follows them; it replaces the formatting toolbar with the element's toolbar, which has a back button at its start and goes away when the cursor leaves the element. The <span class="tn-icon cke cke-plus"></span> button after them opens insertions as tiles at the bottom of the screen: code block, block quote and admonition (also in the block type button), then the less common collapsible, tabs, columns, horizontal line, page break, footnote, math, drawing canvas, Mermaid diagram, bookmark, link and content embeds, special characters, emoji, icon, date/time, template and Markdown import. The tiles marked with <span class="tn-icon bx bx-chevron-right"></span> open a list of choices: _Code block_ the language, _Admonition_ its type, _Columns_ the number of columns, _Footnote_ a new footnote or a reference to an existing one, _Date/time_ the format of the date and time, and _Insert text snippet_ the template to insert, which is grayed out while there are none. The block type button shows the type of the current block as an icon rather than its name, and opens the block types as tiles at the bottom of the screen, with the current one highlighted: paragraph and heading 2 to 6, then bulleted list, numbered list and to-do list, then code block, block quote and admonition. Picking a paragraph or a heading in a list turns the item back into plain text, and the same goes for a code block. Block quote and admonition wrap the current block rather than replace it, so they are highlighted alongside it; pick one again to remove it. Typing `-` , `1.` or `[ ]` at the start of a line also starts a list. The style of a list (such as roman numerals) and its start number can only be changed on desktop. The <span class="tn-icon cke cke-trilium-ai"></span> AI assistant button, shown once a provider is configured, opens its quick actions as a menu at the bottom of the screen, with _Ask AI…_ at its top. The alignment button shows the alignment of the current block, and opens left, center, right and justify as a row of tiles, with the current one highlighted. The <span class="tn-icon cke cke-paper-clip"></span> button replaces the separate image upload and attach file buttons: it opens _Image_, _Camera_, _Attach and embed file_ and _Attach file as a link_ as a row of tiles. _Camera_ opens the device's camera and inserts the photo taken; the others open the device's file picker. The <span class="tn-icon cke cke-table"></span> table button opens common table sizes as tiles. The <span class="tn-icon cke cke-arrow-up"></span> and <span class="tn-icon cke cke-arrow-down"></span> buttons after the indentation buttons move the current block, or the selected blocks, up or down, as <kbd>Alt</kbd>+<kbd>↑</kbd> and <kbd>Alt</kbd>+<kbd>↓</kbd> do on a keyboard. Inside a table they move the row instead.+* In a text note, the formatting toolbar sits at the bottom of the screen as a single row that scrolls sideways. It is shown only while you are editing the text, and hides when you hide the keyboard or move to another field, such as the note title. It starts with _Undo_ and _Redo_, since the on-screen keyboard has no keys for them. While the cursor is in a table, an image, a code block or another element that has a toolbar of its own on desktop, a button with that element's icon follows them; it replaces the formatting toolbar with the element's toolbar, which has a back button at its start and goes away when the cursor leaves the element. Its buttons with a list of choices, such as the column and row actions of a table, open that list as a menu at the bottom of the screen. The <span class="tn-icon cke cke-plus"></span> button after them opens insertions as tiles at the bottom of the screen: code block, block quote and admonition (also in the block type button), then the less common collapsible, tabs, columns, horizontal line, page break, footnote, math, drawing canvas, Mermaid diagram, bookmark, link and content embeds, special characters, emoji, icon, date/time, template and Markdown import. The tiles marked with <span class="tn-icon bx bx-chevron-right"></span> open a list of choices: _Code block_ the language, _Admonition_ its type, _Columns_ the number of columns, _Footnote_ a new footnote or a reference to an existing one, _Date/time_ the format of the date and time, and _Insert text snippet_ the template to insert, which is grayed out while there are none. The block type button shows the type of the current block as an icon rather than its name, and opens the block types as tiles at the bottom of the screen, with the current one highlighted: paragraph and heading 2 to 6, then bulleted list, numbered list and to-do list, then code block, block quote and admonition. Picking a paragraph or a heading in a list turns the item back into plain text, and the same goes for a code block. Block quote and admonition wrap the current block rather than replace it, so they are highlighted alongside it; pick one again to remove it. Typing `-` , `1.` or `[ ]` at the start of a line also starts a list. The style of a list (such as roman numerals) and its start number can only be changed on desktop. The <span class="tn-icon cke cke-trilium-ai"></span> AI assistant button, shown once a provider is configured, opens its quick actions as a menu at the bottom of the screen, with _Ask AI…_ at its top. The alignment button shows the alignment of the current block, and opens left, center, right and justify as a row of tiles, with the current one highlighted. The <span class="tn-icon cke cke-paper-clip"></span> button replaces the separate image upload and attach file buttons: it opens _Image_, _Camera_, _Attach and embed file_ and _Attach file as a link_ as a row of tiles. _Camera_ opens the device's camera and inserts the photo taken; the others open the device's file picker. The <span class="tn-icon cke cke-table"></span> table button opens common table sizes as tiles. The <span class="tn-icon cke cke-arrow-up"></span> and <span class="tn-icon cke cke-arrow-down"></span> buttons after the indentation buttons move the current block, or the selected blocks, up or down, as <kbd>Alt</kbd>+<kbd>↑</kbd> and <kbd>Alt</kbd>+<kbd>↓</kbd> do on a keyboard. Inside a table they move the row instead.* The formatting applied to text (bold, italic, underline, strikethrough, inline code, superscript and subscript, keyboard shortcut, font size and colors, and removing formatting) is on a row of its own, which ends with <span class="tn-icon cke cke-trilium-scissors"></span> to cut the selection into a sub-note. Tap <span class="tn-icon cke cke-text"></span> next to the block type button to show it, and <span class="tn-icon cke cke-previous-arrow"></span> at its start to return to the main row. Selecting text shows this row on its own, and it goes back to the main row once the selection is gone (for example as you start typing), unless you opened or closed the row yourself in the meantime. The font size button opens the list of sizes as a menu at the bottom of the screen, each drawn at its size, with the current one checked. A single color button replaces the separate text and background color buttons: it opens a menu with a row of colors for the text and one for its background, each with a cell that removes the color and one that opens the device's color picker.* While the on-screen keyboard is open, a <span class="tn-icon bx bxs-keyboard"></span> button in the bottom-right corner, just above the keyboard, hides it. In a text note, the button is at the right end of the formatting toolbar. While a menu of the formatting toolbar is open in place of the keyboard, the button becomes a <span class="tn-icon bx bx-x"></span>, which closes the menu and brings the keyboard back. This works in every note type and in every text field, and is the only way to hide the keyboard in the iOS app, where the keyboard has no _Done_ button.* The <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Tabs.md">Tabs</a> are grouped under a tab switcher in the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Launch%20Bar.md">Launch Bar</a>, where the tabs are displayed in a full-screen grid with preview for easy switching, as well as additional options such as reopening closed tabs.diff --git a/packages/ckeditor5/src/plugins/context_toolbar.spec.ts b/packages/ckeditor5/src/plugins/context_toolbar.spec.tsindex 07e15f968c..1ffb8aa32c 100644--- a/packages/ckeditor5/src/plugins/context_toolbar.spec.ts+++ b/packages/ckeditor5/src/plugins/context_toolbar.spec.ts@@ -1,12 +1,13 @@import {_setModelData as setModelData,- ButtonView, type ClassicEditor, Essentials, IconPreviousArrow, IconTable, Paragraph, Table, TableCaption, TableToolbar,+ ButtonView, type ClassicEditor, DropdownView, Essentials, IconPreviousArrow, IconTable, Paragraph, Table, TableCaption, TableToolbar,ToolbarSeparatorView, WidgetToolbarRepository} from "ckeditor5";import { describe, expect, it, vi } from "vitest";import { createTestEditor } from "../../test/editor-kit.js";import ContextToolbar from "./context_toolbar.js";+import ToolbarGroupMenu, { type ToolbarGroupMenuRequest } from "./toolbar_group_menu.js";const TABLE = "<table><tableRow><tableCell><paragraph>a[]</paragraph></tableCell></tableRow></table><paragraph>b</paragraph>";@@ -69,6 +70,29 @@ describe("ContextToolbar", () => {expect(button.isVisible).toBe(false);});+ it("opens the lists of its dropdowns as menus of the app, in place of their panels", async () => {+ const requests: ToolbarGroupMenuRequest[] = [];+ const host = { show: vi.fn((request: ToolbarGroupMenuRequest) => requests.push(request)), hide: vi.fn(), destroy: vi.fn() };+ const editor = await createTestEditor(+ [Essentials, Paragraph, Table, TableToolbar, ContextToolbar, ToolbarGroupMenu],+ {+ toolbar: ["contextToolbar"],+ table: { contentToolbar: ["tableColumn"] },+ toolbarGroupMenu: { host: () => host }+ }+ );+ editor.ui.focusTracker.isFocused = true;+ setModelData(editor.model, TABLE);+ editor.ui.update();+ getButton(editor).fire("execute");++ const column = [...editor.plugins.get(ContextToolbar).toolbarView.items][2] as DropdownView;+ column.buttonView.fire("open");+ expect(column.isOpen).toBe(false);+ const rows = requests.at(-1)?.items ?? [];+ expect(rows.flatMap((row) => (row.kind === "entry" ? [row.label] : []))).toContain("Insert column left");+ });+it("leaves the balloons alone in an editor without its button", async () => {const { editor } = await createEditor(["undo"]);expect(editor.plugins.get(WidgetToolbarRepository).isEnabled).toBe(true);diff --git a/packages/ckeditor5/src/plugins/context_toolbar.ts b/packages/ckeditor5/src/plugins/context_toolbar.tsindex 7b9c7b86bc..e3f5c902e2 100644--- a/packages/ckeditor5/src/plugins/context_toolbar.ts+++ b/packages/ckeditor5/src/plugins/context_toolbar.ts@@ -1,10 +1,11 @@import {- ButtonView, IconCodeBlock, IconImage, IconPreviousArrow, IconTable, IconThreeVerticalDots, Plugin,+ ButtonView, DropdownView, IconCodeBlock, IconImage, IconPreviousArrow, IconTable, IconThreeVerticalDots, Plugin,ToolbarSeparatorView, ToolbarView, WidgetToolbarRepository} from "ckeditor5";import type { Editor, ToolbarConfig, ToolbarConfigItem, ViewElement, ViewDocumentSelection } from "ckeditor5";import admonitionIcon from "../icons/admonition.svg?raw";+import { openListAsMenu } from "./toolbar_group_menu.js";/** The icons of the `contextToolbar` button, by the id a widget toolbar is registered under. */const TOOLBAR_ICONS: Record<string, string> = {@@ -36,6 +37,7 @@ interface ContextToolbarSource {* The button shows while the selection is in a widget that has a toolbar. It swaps in* {@link toolbarView}: a back button, then the items of the toolbar the balloon would show, which is* the one of the innermost widget. The toolbar swaps out as the selection leaves that widget.+ * Its dropdowns open as menus of `ToolbarGroupMenu`, like the rest of a phone's toolbar.*/export default class ContextToolbar extends Plugin {@@ -96,6 +98,12 @@ export default class ContextToolbar extends Plugin {// Grouping measures the rendered toolbar as items arrive.this.toolbarView.render();this.toolbarView.items.addMany([this.backView, new ToolbarSeparatorView()]);+ // Before `ToolbarGroupMenu`, which decides on a dropdown as it is added.+ this.listenTo(this.toolbarView.items, "add", (_evt, item) => {+ if (item instanceof DropdownView) {+ openListAsMenu(item);+ }+ }, { priority: "highest" });editor.ui.addToolbar(this.toolbarView);// The event `WidgetToolbarRepository` updates its balloons on.