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(search): allow turning off the context-menu web search (closes #12287)
Elian Doran5339e9a4d09a
diff --git a/apps/client/src/menus/note_context_menu.spec.ts b/apps/client/src/menus/note_context_menu.spec.tsindex 5b2fcfdbba..8ec37e37bf 100644--- a/apps/client/src/menus/note_context_menu.spec.ts+++ b/apps/client/src/menus/note_context_menu.spec.ts@@ -2,7 +2,10 @@ import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest";// All mutable mock state lives in a hoisted holder so the (hoisted) vi.mock// factory below can reference it.-const h = vi.hoisted(() => ({ triggerCommand: vi.fn() }));+const h = vi.hoisted(() => ({+ triggerCommand: vi.fn(),+ options: {} as Record<string, string>+}));vi.mock("../components/app_context.js", () => ({default: { triggerCommand: h.triggerCommand }@@ -16,7 +19,9 @@ vi.mock("../services/block_reference.js", () => ({}));vi.mock("../services/clipboard_ext.js", () => ({ copyHtml: vi.fn(), copyTextWithToast: vi.fn() }));vi.mock("../services/i18n.js", () => ({ t: (key: string) => key }));-vi.mock("../services/options.js", () => ({ default: { get: () => "" } }));+vi.mock("../services/options.js", () => ({+ default: { get: (name: string) => h.options[name] ?? "" }+}));vi.mock("../services/server.js", () => ({ default: { post: vi.fn() } }));vi.mock("../services/utils.js", () => ({default: { escapeHtml: (s: string) => s, isMac: () => false },@@ -161,6 +166,7 @@ function submenu(items: MenuItem<any>[], title: string): MenuItem<any>[] {describe("buildNoteContextMenuItems", () => {beforeEach(() => {vi.clearAllMocks();+ h.options = {};});it("offers copy, copy-as-markdown and the search rows for a plain selection", async () => {@@ -271,6 +277,23 @@ describe("buildNoteContextMenuItems", () => {});});+ it("searches with the configured engine, and leaves the web search out when it is none", async () => {+ const host = browserLikeHost();+ h.options = {+ customSearchEngineName: "Google",+ customSearchEngineUrl: "https://www.google.com/search?q={keyword}"+ };+ run(await build({ selectionText: "trilium" }, host), "electron_context_menu.search_online");+ expect(host.openExternal).toHaveBeenCalledWith("https://www.google.com/search?q=trilium");++ h.options = { customSearchEngineName: "", customSearchEngineUrl: "none" };+ expect(titles(await build())).toEqual([+ "electron_context_menu.copy",+ "---",+ "electron_context_menu.search_in_trilium"+ ]);+ });+it("puts the text tools of a code editor below the clipboard rows", async () => {const line = document.createElement("div");vi.mocked(buildCodeEditorContextMenuItems).mockResolvedValueOnce([diff --git a/apps/client/src/menus/note_context_menu.ts b/apps/client/src/menus/note_context_menu.tsindex 2a27a9d9b1..71d45de577 100644--- a/apps/client/src/menus/note_context_menu.ts+++ b/apps/client/src/menus/note_context_menu.ts@@ -13,6 +13,9 @@ import { splitMenuItem } from "./context_menu_utils.js";import { buildTableContextMenuSections, hasTableCellSelection } from "./table_context_menu.js";import { buildAiActionsMenuItem, getTextEditorAtSelection } from "./text_editor_context_menu.js";+/** The `customSearchEngineUrl` that turns off searching the web from the context menu. */+export const NO_SEARCH_ENGINE = "none";+/** What the pointer was over when the menu was summoned. */export interface ContextMenuTarget {/** URL of the link under the pointer, or an empty string. */@@ -265,30 +268,20 @@ export async function buildNoteContextMenuItems(? `${selectionText.slice(0, 13)}…`: selectionText;- const customSearchEngineName = options.get("customSearchEngineName");- const customSearchEngineUrl = options.get("customSearchEngineUrl") as string;- let searchEngineName;- let searchEngineUrl;- if (customSearchEngineName && customSearchEngineUrl) {- searchEngineName = customSearchEngineName;- searchEngineUrl = customSearchEngineUrl;- } else {- searchEngineName = "DuckDuckGo";- searchEngineUrl = "https://duckduckgo.com/?q={keyword}";- }-- const searchUrl = searchEngineUrl.replace("{keyword}", encodeURIComponent(selectionText));-items.push({ kind: "separator" });- items.push({- title: t("electron_context_menu.search_online", {- term: utils.escapeHtml(shortenedSelection),- searchEngine: utils.escapeHtml(searchEngineName)- }),- uiIcon: "bx bx-search-alt",- handler: () => host.openExternal(searchUrl)- });+ const searchEngine = getSearchEngine();+ if (searchEngine) {+ const searchUrl = searchEngine.url.replace("{keyword}", encodeURIComponent(selectionText));+ items.push({+ title: t("electron_context_menu.search_online", {+ term: utils.escapeHtml(shortenedSelection),+ searchEngine: utils.escapeHtml(searchEngine.name)+ }),+ uiIcon: "bx bx-search-alt",+ handler: () => host.openExternal(searchUrl)+ });+ }items.push({title: t("electron_context_menu.search_in_trilium", { term: utils.escapeHtml(shortenedSelection) }),@@ -302,6 +295,14 @@ export async function buildNoteContextMenuItems(return items;}+function getSearchEngine(): { name: string; url: string } | null {+ const name = options.get("customSearchEngineName");+ const url = options.get("customSearchEngineUrl");+ if (url === NO_SEARCH_ENGINE) return null;+ if (name && url) return { name, url };+ return { name: "DuckDuckGo", url: "https://duckduckgo.com/?q={keyword}" };+}+/*** Returns the HTML to feed to the Markdown converter for the "Copy as Markdown" action.*diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.jsonindex 668b3d834b..6853976a3f 100644--- a/apps/client/src/translations/en/translation.json+++ b/apps/client/src/translations/en/translation.json@@ -2097,12 +2097,13 @@},"search_engine": {"title": "Search Engine",- "custom_search_engine_info": "Used when searching the web for selected text. If not configured, DuckDuckGo will be used.",+ "custom_search_engine_info": "Used when searching the web for selected text. If not configured, DuckDuckGo will be used. Choose None to remove the web search from the context menu.","predefined_templates_label": "Presets","bing": "Bing","baidu": "Baidu","duckduckgo": "DuckDuckGo","google": "Google",+ "none": "None","custom_name_label": "Name","custom_name_placeholder": "Search engine name","custom_url_label": "URL",diff --git a/apps/client/src/widgets/type_widgets/options/desktop.spec.tsx b/apps/client/src/widgets/type_widgets/options/desktop.spec.tsxindex f8057bfff7..40a492be7c 100644--- a/apps/client/src/widgets/type_widgets/options/desktop.spec.tsx+++ b/apps/client/src/widgets/type_widgets/options/desktop.spec.tsx@@ -121,10 +121,19 @@ describe("the search engine settings", () => {open();const chips = [ ...host.querySelectorAll(".search-engine-templates .ext-badge") ];- expect(chips).toHaveLength(4);+ expect(chips).toHaveLength(5);expect(chips.filter((chip) => chip.className.includes("selected"))).toHaveLength(1);act(() => (chips[0] as HTMLElement).click());expect(mocks.saved.map(([ name ]) => name)).toEqual([ "customSearchEngineName", "customSearchEngineUrl" ]);});++ it("turns the web search off with the none preset", () => {+ open();+ const none = host.querySelector(".search-engine-templates .ext-badge:last-child");+ expect(none?.textContent).toBe("search_engine.none");++ act(() => (none as HTMLElement).click());+ expect(mocks.saved).toEqual([ [ "customSearchEngineName", "" ], [ "customSearchEngineUrl", "none" ] ]);+ });});diff --git a/apps/client/src/widgets/type_widgets/options/desktop.tsx b/apps/client/src/widgets/type_widgets/options/desktop.tsxindex 638e798e83..5393053fb8 100644--- a/apps/client/src/widgets/type_widgets/options/desktop.tsx+++ b/apps/client/src/widgets/type_widgets/options/desktop.tsx@@ -2,6 +2,7 @@ import "./desktop.css";import { useMemo } from "preact/hooks";+import { NO_SEARCH_ENGINE } from "../../../menus/note_context_menu";import { t } from "../../../services/i18n";import utils, { isElectron } from "../../../services/utils";import { Badge } from "../../react/Badge";@@ -124,7 +125,8 @@ function SearchEngineSettings() {{ url: "https://duckduckgo.com/?q={keyword}", name: t("search_engine.duckduckgo") },{ url: "https://www.bing.com/search?q={keyword}", name: t("search_engine.bing"), icon: "bx bxl-bing" },{ url: "https://www.baidu.com/s?wd={keyword}", name: t("search_engine.baidu"), icon: "bx bxl-baidu" },- { url: "https://www.google.com/search?q={keyword}", name: t("search_engine.google"), icon: "bx bxl-google" }+ { url: "https://www.google.com/search?q={keyword}", name: t("search_engine.google"), icon: "bx bxl-google" },+ { url: NO_SEARCH_ENGINE, name: "", label: t("search_engine.none"), icon: "bx bx-block" }];}, []);@@ -139,7 +141,7 @@ function SearchEngineSettings() {<Badgekey={engine.url}icon={engine.icon}- text={engine.name}+ text={engine.label ?? engine.name}className={customSearchEngineUrl === engine.url ? "selected" : ""}onClick={() => {setCustomSearchEngineName(engine.name);diff --git a/apps/server/src/assets/help/help_content.json b/apps/server/src/assets/help/help_content.jsonindex 5d108cc76e..d32484a803 100644--- a/apps/server/src/assets/help/help_content.json+++ b/apps/server/src/assets/help/help_content.json@@ -58,7 +58,7 @@"_help_lgKX7r3aL30x": "<figure class=\"image image-style-align-right\"><img style=\"aspect-ratio:505/261;\" src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tooltip_image.png\" width=\"505\" height=\"261\"></figure><p>The note tooltip is a convenience feature which displays a popup when hovering over an <a href=\"#root/_help_hrZ1D00cLbal\">internal link</a> to another note.</p><p>The following information is displayed:</p><ul><li>The note path, at the top of the popup.</li><li>The title of the note.<ul><li>Clicking on the title will open the note in the current tab.</li><li>Holding <kbd>Ctrl</kbd> pressed while clicking the title will open in a new tab instead of the current one.</li></ul></li><li>A snippet of the content will be displayed as well.</li><li>A button to <a href=\"#root/_help_ZjLYv08Rp3qC\">quickly edit</a> the note in a popup.</li></ul><p>For a link to an <a href=\"#root/_help_0vhv7lsOLy82\">attachment</a>, the tooltip shows the attachment instead: its title after the path of the note that owns it, a line giving its size (for example <em>Attachment • 20.59 MiB</em>), a preview of its content where one is available, and the quick edit button opening the attachment.</p><p>The tooltip can be found in multiple places, including:</p><ul><li>In <a class=\"reference-link\" href=\"#root/_help_iPIMuisry3hd\">Text</a> notes, when hovering over <a class=\"reference-link\" href=\"#root/_help_hrZ1D00cLbal\">Internal (reference) links</a> .</li><li><a class=\"reference-link\" href=\"#root/_help_GTwFsgaA0lCt\">Collections</a>: <ul><li><a class=\"reference-link\" href=\"#root/_help_81SGnPGMk7Xc\">Geo Map View</a>, when hovering over a marker.</li><li><a class=\"reference-link\" href=\"#root/_help_xWbu3jpNWapp\">Calendar View</a>, when hovering over an event.</li><li><a class=\"reference-link\" href=\"#root/_help_2FvYrpmOXm29\">Table View</a>, when hovering over a note title, or over a <a href=\"#root/_help_Cq5X6iKQop6R\">relation</a>.</li></ul></li></ul>","_help_SL5f1Auq7sVN": "<p>Split view is a feature of <a class=\"reference-link\" href=\"#root/_help_s1aBHPd79XYj\">Mermaid Diagrams</a> and <a class=\"reference-link\" href=\"#root/_help_6RM1Q7ppFVoj\">Markdown</a> notes which displays both the source code on one side and the preview of the content on the other.</p><p><a class=\"reference-link\" href=\"#root/_help_s1aBHPd79XYj\">Mermaid Diagrams</a> also allow changing between a horizontal or a vertical split, to accommodate for the various sizes of diagrams.</p><h2>Display modes and interaction</h2><p>The split comes with three different display modes which can be toggled from the <a class=\"reference-link\" href=\"#root/_help_1P8QXI5edXNd\">Note buttons</a> area:</p><ul><li><span class=\"tn-icon bx bxs-dock-left\"></span> <em>(Split view)</em>, in which both the source code is available on one side and can be edited, and the preview is available on the other side.<ul><li>In this mode, the size of either the source pane or the preview pane can be adjusted by dragging the small border between them.</li></ul></li><li><span class=\"tn-icon bx bx-code\"></span> (<em>Source view)</em> which shows the source code on the entire screen for a more focused editing experience.</li><li><span class=\"tn-icon bx bx-show\"></span> <em>(Preview)</em> which displays only the rendering of the diagram or text in full screen, especially useful for read-only notes.</li></ul><p>The display node is stored at note level.</p><p>A Markdown note included in a text note, or a Markdown file embedded in one, has the same three display modes, switched from the title row and the toolbar of the include. See <em>Included Markdown</em> in <a class=\"reference-link\" href=\"#root/_help_nBAXQFj20hS1\">Include Note</a>.</p><h2>Relation to read-only notes</h2><p>If a note is marked as <a href=\"#root/_help_CoFPLs3dRlXc\">read-only</a>, the source view will not be editable. While in preview mode, marking a note as read-only has no effect since the preview itself is not editable.</p>","_help_t596jLvPrqkS": "<p>Some note types (such as <a class=\"reference-link\" href=\"#root/_help_iPIMuisry3hd\">Text</a> and saved search) intentionally limit the width of the content.</p><p>This might appear surprising at first, but the idea is to make text fit well on wider screens without appearing distorted. This is especially the case if the document contains <a class=\"reference-link\" href=\"#root/_help_mT0HEkOsz6i1\">Images</a>, tables or other width-dependent elements.</p><h2>Configuring the content width and alignment</h2><p>The content width is expressed in pixels and can be changed from <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Appearance</em> → <em>Content Width</em> and adjusting the <em>Max content width</em> section.</p><p>To effectively disable the content width limitation, simply set the width to a value larger than your screen size (e.g. 9999).</p><p>By default, the content is aligned to the left, but it can be centered horizontally by checking <em>Keep content centered</em> from the same section as the content width.</p><h2>Adjusting at note level</h2><p>For notes with large elements such as <a class=\"reference-link\" href=\"#root/_help_NdowYOC1GFKS\">Tables</a>, it sometimes makes sense to avoid the content width without affecting other notes. To do so:</p><ul><li>Go to <a class=\"reference-link\" href=\"#root/_help_8YBEPzcpUgxw\">Note menu</a> and toggle <em>Full width</em>.</li><li>Or manually apply the <code>fullContentWidth</code> <a href=\"#root/_help_HI6GBBIduIgv\">label</a> to the note.</li></ul><p>Since v0.107.0, a single table can also be made wider than the content width, in which case it scrolls sideways. See <a class=\"reference-link\" href=\"#root/_help_NdowYOC1GFKS\">Tables</a>.</p><aside class=\"admonition note\"><p>Some <a href=\"#root/_help_KSZ04uQ2D1St\">note types</a> are full width by default, such as the <a class=\"reference-link\" href=\"#root/_help_grjYqerjn243\">Canvas</a>. In that case the <em>Full width</em> toggle will not be displayed and the label will have no effect.</p></aside><h2>Shared notes</h2><p>On a <a href=\"#root/_help_R9pX4DGra2Vt\">shared page</a>, a text note is shown at a fixed reading width, whatever the width configured in Options, and the navigation tree, the content and the table of contents are kept together in a column centered on a wide screen. A note with <code>fullContentWidth</code>, or of a type that is full width in the application, uses the whole width of the window there, with the navigation tree and the table of contents at its edges.</p>",- "_help_jcQVxzYybYgz": "<figure class=\"image image-style-align-right image_resized\" style=\"width:44.65%;\"><img style=\"aspect-ratio:514/291;\" src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/UI%20Elements/Note%20contextual%20menu_image.png\" width=\"514\" height=\"291\"></figure><p>Right-clicking the content of some note types such as <a class=\"reference-link\" href=\"#root/_help_iPIMuisry3hd\">Text</a> or <a class=\"reference-link\" href=\"#root/_help_6f9hih2hXXZk\">Code</a> reveals a contextual menu.</p><h2>Features</h2><ul><li>On the <a class=\"reference-link\" href=\"#root/_help_poXkQfguuA0U\">Desktop Installation</a>, the <a class=\"reference-link\" href=\"#root/_help_oBo3iHIZnbG2\">Spell Check</a> suggestions are shown when right clicking on a misspelled word.</li><li>The selected text can be searched either with a search engine (configured from <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a>) or <a href=\"#root/_help_eIg8jdvaoNNd\">inside Trilium</a>.</li><li>Basic clipboard functionality (cut, copy, paste).</li><li>Copying the selected text as <a class=\"reference-link\" href=\"#root/_help_Oau6X9rCuegd\">Markdown</a>.</li><li>Performing quick operations using the <a class=\"reference-link\" href=\"#root/_help_VRoP0g1uHHc2\">In-editor AI assistant</a>.</li></ul><h2>Differences between desktop and web</h2><p>The <a href=\"#root/_help_WOcw2SLH6tbX\">web version</a> behaves slightly different due to limitations imposed by web browsers:</p><ul><li>When no text is selected or a word is right-clicked, the browser's default contextual menu is displayed.<ul><li>This is intentional since it preserves the <a class=\"reference-link\" href=\"#root/_help_oBo3iHIZnbG2\">Spell Check</a> functionality.</li></ul></li><li>When a text is selected, a reduced menu is displayed instead which features only the functionality that is available within the browser version<ul><li><em>Paste</em> is not available since the browser doesn't expose it, use <kbd>Ctrl</kbd>+<kbd>V</kbd> instead.</li><li>The browser menu can be triggered anyway by pressing <kbd>Shift</kbd> + <kbd>Right click</kbd>.</li></ul></li></ul>",+ "_help_jcQVxzYybYgz": "<figure class=\"image image-style-align-right image_resized\" style=\"width:44.65%;\"><img style=\"aspect-ratio:514/291;\" src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/UI%20Elements/Note%20contextual%20menu_image.png\" width=\"514\" height=\"291\"></figure><p>Right-clicking the content of some note types such as <a class=\"reference-link\" href=\"#root/_help_iPIMuisry3hd\">Text</a> or <a class=\"reference-link\" href=\"#root/_help_6f9hih2hXXZk\">Code</a> reveals a contextual menu.</p><h2>Features</h2><ul><li>On the <a class=\"reference-link\" href=\"#root/_help_poXkQfguuA0U\">Desktop Installation</a>, the <a class=\"reference-link\" href=\"#root/_help_oBo3iHIZnbG2\">Spell Check</a> suggestions are shown when right clicking on a misspelled word.</li><li>The selected text can be searched either with a search engine (configured from <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a>) or <a href=\"#root/_help_eIg8jdvaoNNd\">inside Trilium</a>.<ul><li>To remove the web search from the menu, choose <em>None</em> as the search engine.</li></ul></li><li>Basic clipboard functionality (cut, copy, paste).</li><li>Copying the selected text as <a class=\"reference-link\" href=\"#root/_help_Oau6X9rCuegd\">Markdown</a>.</li><li>Performing quick operations using the <a class=\"reference-link\" href=\"#root/_help_VRoP0g1uHHc2\">In-editor AI assistant</a>.</li></ul><h2>Differences between desktop and web</h2><p>The <a href=\"#root/_help_WOcw2SLH6tbX\">web version</a> behaves slightly different due to limitations imposed by web browsers:</p><ul><li>When no text is selected or a word is right-clicked, the browser's default contextual menu is displayed.<ul><li>This is intentional since it preserves the <a class=\"reference-link\" href=\"#root/_help_oBo3iHIZnbG2\">Spell Check</a> functionality.</li></ul></li><li>When a text is selected, a reduced menu is displayed instead which features only the functionality that is available within the browser version<ul><li><em>Paste</em> is not available since the browser doesn't expose it, use <kbd>Ctrl</kbd>+<kbd>V</kbd> instead.</li><li>The browser menu can be triggered anyway by pressing <kbd>Shift</kbd> + <kbd>Right click</kbd>.</li></ul></li></ul>","_help_AlJ73vBCjWDw": "<p>The status bar displays information about the current note and allows changing settings related to it such as configuring the language or attributes.</p><h2>Layout and interaction</h2><p>On the left side, the <a class=\"reference-link\" href=\"#root/_help_I6p2a06hdnL6\">Breadcrumb</a> is displayed which indicates the current note as well as its parent notes and allows for quick navigation throughout the hierarchy.</p><p>On the right side, specific sections will show depending on the type of the current note.</p><ol><li>For <a class=\"reference-link\" href=\"#root/_help_6f9hih2hXXZk\">Code</a> notes, the language mode of the note is indicated (e.g. JavaScript, plain text), as well as allowing easy switching to another mode.<ol><li>Before it, the position of the cursor is shown as a line and a column, such as <em>Ln: 12 Col: 32</em>. It updates as the cursor moves. While text is selected, the number of selected characters follows, such as <em>Selected: 120</em>.</li></ol></li><li>For <a class=\"reference-link\" href=\"#root/_help_iPIMuisry3hd\">Text</a> notes, the content language is displayed and can be changed, thus configuring the spell-check and the right-to-left support.<ol><li>Note that this applies to the entire note and not the selection, unlike some text editors.</li></ol></li><li>If a note is placed in multiple places in the tree (cloned), the number of the note paths will be displayed.<ol><li>Clicking it opens a popup with the full list of note paths, from which the note can also be cloned to a new location. The same list is available in the sidebar's <a class=\"reference-link\" href=\"#root/_help_KRlZFoIH0j6p\">Connections tab</a>.</li></ol></li><li>If a note has attachments, their number will be displayed.<ol><li>Clicking on it will reveal the list of attachments in a new tab.</li></ol></li><li>If a note is linked from other text notes (backlinks), the number of backlinks will be displayed.<ol><li>Clicking on it opens a popup with the list of notes that link to this note, as well as an excerpt of where the note is referenced. The same list is available in the sidebar's <a class=\"reference-link\" href=\"#root/_help_KRlZFoIH0j6p\">Connections tab</a>.</li></ol></li></ol><p>Regardless of note type, the following items will always be displayed if there is a note:</p><ol><li>Note info, which displays:<ol><li>The creation/modification date of the note.</li><li>The type and MIME of the note.</li><li>The note ID.</li><li>An estimation of the note size of the note itself and its children.</li><li>A button to reveal the Similar notes in the sidebar's <a class=\"reference-link\" href=\"#root/_help_KRlZFoIH0j6p\">Connections tab</a>.</li></ol></li></ol><aside class=\"admonition note\"><p>When pressing a button which reveals the <a class=\"reference-link\" href=\"#root/_help_RnaPdbciOfeq\">Right Sidebar</a>, it has a specific behavior if the sidebar is hidden: the sidebar will be peeked instead of docked. Regardless the sidebar will be switched to the appropriate tab and the corresponding section will be highlighted.</p></aside>","_help_I6p2a06hdnL6": "<figure class=\"image\"><img style=\"aspect-ratio:1150/27;\" src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/UI%20Elements/Breadcrumb_image.png\" width=\"1150\" height=\"27\"></figure><p>The breadcrumb allows quickly viewing the note hierarchy of the current note and navigating through it.</p><p>It is part of the <a class=\"reference-link\" href=\"#root/_help_AlJ73vBCjWDw\">Status bar</a>, displayed in the bottom-left of the screen.</p><h2>Layout and Interaction</h2><ul><li>If a note or workspace is hoisted, a badge will appear on the left-most side.<ul><li>Clicking on the badge will un-hoist the note/workspace.</li></ul></li><li>The left-most icon represents the root note, or the hoisted note or workspace.<ul><li>Clicking the icon will jump to the root note.</li><li>Right clicking the icon will display a menu that allows opening the note in a new tab, split, etc.</li></ul></li><li>Each segment shows the title of a note in the current note hierarchy.<ul><li>Clicking the icon will jump to that note.</li><li>Right clicking will open a menu with multiple options such as opening the note in a different tab/split/window, hoisting, moving/cloning the note, duplicating as well as changing the color of the note.</li></ul></li><li>Clicking the arrow next to each segment will reveal the child notes of the segment on the left.<ul><li>Clicking on an icon will navigate to that particular note.</li><li>To find a child note by its title, start typing: the field at the bottom of the menu filters the list.</li><li>It's also possible to create a new child note from here.</li><li>The menu can optionally hide the archived notes.</li></ul></li><li>If the current note is deep within a hierarchy, the segments will collapse into a […] button in order not to occupy too much space.<ul><li>Clicking this button will display each collapsed entry as a menu item. Clicking on it will navigate to that particular note.</li></ul></li><li>Right clicking on an empty space to the right of the breadcrumb (before the other status bar items) will reveal another menu that allows:<ul><li>Toggling whether archived notes are displayed in the breadcrumb and in the note tree.</li><li>Copying the current note path to clipboard.</li></ul></li></ul>","_help_BFs8mudNFgCS": "<p>Note is a central entity in Trilium. Main attributes of note are <a href=\"#root/_help_l7pigIGu01K2\">title</a> and content.</p><h3>Note types</h3><p>The main note type is a rich-text note type called <a class=\"reference-link\" href=\"#root/_help_iPIMuisry3hd\">Text</a>. For diagrams and drawing there is <a class=\"reference-link\" href=\"#root/_help_grjYqerjn243\">Canvas</a> and <a class=\"reference-link\" href=\"#root/_help_s1aBHPd79XYj\">Mermaid Diagrams</a>.</p><p>There are also more complex note types such as <a class=\"reference-link\" href=\"#root/_help_m523cpzocqaD\">Saved Search</a>, <a class=\"reference-link\" href=\"#root/_help_HcABDtFCkbFN\">Render Note</a> that usually go hand-in-hand with <a class=\"reference-link\" href=\"#root/_help_CdNpE2pqjmI6\">Scripting</a>.</p><p>In Trilium there's no specific \"folder\" note type. Any note can have children and thus be a folder. To make a note that only shows its children, like a folder in other applications, use a <a class=\"reference-link\" href=\"#root/_help_8QqnMzx393bx\">Grid View</a> or <a class=\"reference-link\" href=\"#root/_help_mULW0Q3VojwY\">List View</a> collection. See also <a class=\"reference-link\" href=\"#root/_help_i6dbnitykE5D\">FAQ</a>.</p><h3>Root note</h3><p>There's one special note called \"root note\" which is root of the note tree. All other notes are placed below it in the structure.</p><h3>Tree structure</h3><p>Importantly, note itself doesn't carry information on its placement in note tree. See <a class=\"reference-link\" href=\"#root/_help_IakOLONlIfGI\">Cloning Notes</a> for details.</p><p>Tree structure of notes can resemble file system - but compared to that notes in Trilium can act as both file and directory - meaning that note can both have its own content and have children. \"Leaf note\" is a note which doesn't have any children.</p><h3>Deleting / undeleting notes</h3><p>When you delete a note in Trilium, it is actually only marked for deletion (soft-delete) - the actual content, title, attributes etc. are not deleted, only hidden.</p><p>Within (by default) 7 days, it is possible to undelete these soft-deleted notes - open the <a class=\"reference-link\" href=\"#root/_help_r5JGHN99bVKn\">Recent Changes</a> dialog, and you will see a list of all modified notes including the deleted ones. Notes available for undeletion have a link to do so. This is kind of \"trash can\" functionality known from e.g. Windows.</p><p>Clicking an undelete will recover the note, its content and attributes - note should be just as before being deleted. This action will also undelete note's children which have been deleted in the same action.</p><p>To be able to undelete a note, it is necessary that deleted note's parent must be undeleted (otherwise there's no place where we can undelete it to). This might become a problem when you delete more notes in succession - the solution is then undelete in the reverse order of your deletion.</p><p>After the 7 days (configurable) the notes will be \"erased\" - their title, content, revisions and attributes will be erased, and it will not be possible anymore to recover them (unless you restore a <a class=\"reference-link\" href=\"#root/_help_ODY7qQn5m2FT\">Backup</a>).</p><h2>See also</h2><ul><li><a class=\"reference-link\" href=\"#root/_help_CoFPLs3dRlXc\">Read-Only Notes</a></li></ul>",diff --git a/docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Note contextual menu.md b/docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Note contextual menu.mdindex 878bd955f1..8b44adcf4e 100644--- a/docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Note contextual menu.md+++ b/docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Note contextual menu.md@@ -7,6 +7,7 @@ Right-clicking the content of some note types such as <a class="reference-link"* On the <a class="reference-link" href="../../Installation%20%26%20Setup/Desktop%20Installation.md">Desktop Installation</a>, the <a class="reference-link" href="../../Note%20Types/Text/Spell%20Check.md">Spell Check</a> suggestions are shown when right clicking on a misspelled word.* The selected text can be searched either with a search engine (configured from <a class="reference-link" href="Options.md">Options</a>) or [inside Trilium](../Navigation/Search.md).+ * To remove the web search from the menu, choose _None_ as the search engine.* Basic clipboard functionality (cut, copy, paste).* Copying the selected text as <a class="reference-link" href="../Import%20%26%20Export/Markdown.md">Markdown</a>.* Performing quick operations using the <a class="reference-link" href="../../Note%20Types/Text/In-editor%20AI%20assistant.md">In-editor AI assistant</a>.