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
fix(options): let web users choose the search engine
Elian Doran0fbb3ec9b154
diff --git a/apps/client/src/widgets/type_widgets/options/desktop.css b/apps/client/src/widgets/type_widgets/options/desktop.cssdeleted file mode 100644index 7e3b050cde..0000000000--- a/apps/client/src/widgets/type_widgets/options/desktop.css+++ /dev/null@@ -1,32 +0,0 @@-/* Overrides the card option's no-shrink rule: a wrapping set of chips gives way instead. */-.tn-card-option > .search-engine-templates {- flex-shrink: 1;- min-width: 0;-}--.search-engine-templates {- --badge-radius: 12px;- display: flex;- flex-wrap: wrap;- justify-content: end;- align-items: center;- gap: 8px;-}--.search-engine-templates .ext-badge {- --color: var(--input-background-color);- color: var(--main-text-color);- font-size: 0.85em;-}--.search-engine-templates .ext-badge.selected {- --color: var(--accented-background-color);- outline: 2px solid var(--accent-color);- outline-offset: -2px;-}--/* A name is a word or two. Not said of the URL below it, which is stacked and uses its whole line. */-.desktop-search-name input {- width: auto;- max-width: 100%;-}diff --git a/apps/client/src/widgets/type_widgets/options/desktop.spec.tsx b/apps/client/src/widgets/type_widgets/options/desktop.spec.tsxindex 40a492be7c..fba445e7a3 100644--- a/apps/client/src/widgets/type_widgets/options/desktop.spec.tsx+++ b/apps/client/src/widgets/type_widgets/options/desktop.spec.tsx@@ -114,26 +114,3 @@ describe("the tray and startup settings", () => {expect(toggle("hide-on-auto-start")?.disabled).toBe(true);});});--describe("the search engine settings", () => {- it("marks the engine currently in use, and takes both its name and its address when one is picked", () => {- mocks.stored = { customSearchEngineUrl: "https://www.google.com/search?q={keyword}" };- open();-- const chips = [ ...host.querySelectorAll(".search-engine-templates .ext-badge") ];- 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 5393053fb8..4279a63ab3 100644--- a/apps/client/src/widgets/type_widgets/options/desktop.tsx+++ b/apps/client/src/widgets/type_widgets/options/desktop.tsx@@ -1,15 +1,8 @@-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";import { Card, OptionCardSection } from "../../react/Card";-import FormTextBox from "../../react/FormTextBox";import FormToggle from "../../react/FormToggle";-import { useTriliumOption, useTriliumOptionBool } from "../../react/hooks";+import { useTriliumOptionBool } from "../../react/hooks";import NoItems from "../../react/NoItems";import OptionsPageHeader from "./components/OptionsPageHeader";@@ -31,7 +24,6 @@ export default function DesktopSettings() {<OptionsPageHeader /><TrayOptionsSettings /><StartupSettings />- <SearchEngineSettings /></>);}@@ -115,65 +107,3 @@ function StartupSettings() {</Card>);}--function SearchEngineSettings() {- const [ customSearchEngineName, setCustomSearchEngineName ] = useTriliumOption("customSearchEngineName");- const [ customSearchEngineUrl, setCustomSearchEngineUrl ] = useTriliumOption("customSearchEngineUrl");-- const searchEngines = useMemo(() => {- return [- { 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: NO_SEARCH_ENGINE, name: "", label: t("search_engine.none"), icon: "bx bx-block" }- ];- }, []);-- return (- <Card- heading={t("search_engine.title")}- description={t("search_engine.custom_search_engine_info")}- >- <OptionCardSection label={t("search_engine.predefined_templates_label")}>- <div className="search-engine-templates">- {searchEngines.map(engine => (- <Badge- key={engine.url}- icon={engine.icon}- text={engine.label ?? engine.name}- className={customSearchEngineUrl === engine.url ? "selected" : ""}- onClick={() => {- setCustomSearchEngineName(engine.name);- setCustomSearchEngineUrl(engine.url);- }}- />- ))}- </div>- </OptionCardSection>-- <OptionCardSection- className="desktop-search-name"- name="custom-name"- label={t("search_engine.custom_name_label")}- >- <FormTextBox- currentValue={customSearchEngineName} onBlur={setCustomSearchEngineName}- placeholder={t("search_engine.custom_name_placeholder")}- />- </OptionCardSection>-- <OptionCardSection- name="custom-url"- label={t("search_engine.custom_url_label")}- description={t("search_engine.custom_url_description")}- stacked- >- <FormTextBox- currentValue={customSearchEngineUrl} onBlur={setCustomSearchEngineUrl}- placeholder={t("search_engine.custom_url_placeholder")}- />- </OptionCardSection>- </Card>- );-}diff --git a/apps/client/src/widgets/type_widgets/options/other.css b/apps/client/src/widgets/type_widgets/options/other.cssindex d95c3d05f7..4c52e2c743 100644--- a/apps/client/src/widgets/type_widgets/options/other.css+++ b/apps/client/src/widgets/type_widgets/options/other.css@@ -10,3 +10,36 @@height: 150px;font-family: var(--monospace-font-family);}++/* Overrides the card option's no-shrink rule: a wrapping set of chips gives way instead. */+.tn-card-option > .search-engine-templates {+ flex-shrink: 1;+ min-width: 0;+}++.search-engine-templates {+ --badge-radius: 12px;+ display: flex;+ flex-wrap: wrap;+ justify-content: end;+ align-items: center;+ gap: 8px;+}++.search-engine-templates .ext-badge {+ --color: var(--input-background-color);+ color: var(--main-text-color);+ font-size: 0.85em;+}++.search-engine-templates .ext-badge.selected {+ --color: var(--accented-background-color);+ outline: 2px solid var(--accent-color);+ outline-offset: -2px;+}++/* A name is a word or two. Not said of the URL below it, which is stacked and uses its whole line. */+.search-engine-name input {+ width: auto;+ max-width: 100%;+}diff --git a/apps/client/src/widgets/type_widgets/options/other.spec.tsx b/apps/client/src/widgets/type_widgets/options/other.spec.tsxindex a0ed73b631..28370aec79 100644--- a/apps/client/src/widgets/type_widgets/options/other.spec.tsx+++ b/apps/client/src/widgets/type_widgets/options/other.spec.tsx@@ -85,6 +85,29 @@ function open() {const button = (name: string) => host.querySelector<HTMLButtonElement>(`button[name='${name}']`);+describe("the search engine settings", () => {+ it("marks the engine currently in use, and takes both its name and its address when one is picked", () => {+ mocks.stored = { ...mocks.stored, customSearchEngineUrl: "https://www.google.com/search?q={keyword}" };+ open();++ const chips = [ ...host.querySelectorAll(".search-engine-templates .ext-badge") ];+ 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" ] ]);+ });+});+describe("erasing what has been deleted", () => {it("asks the server to erase now, for notes and for attachments alike", async () => {open();diff --git a/apps/client/src/widgets/type_widgets/options/other.tsx b/apps/client/src/widgets/type_widgets/options/other.tsxindex 29918cd281..89dc87346a 100644--- a/apps/client/src/widgets/type_widgets/options/other.tsx+++ b/apps/client/src/widgets/type_widgets/options/other.tsx@@ -1,14 +1,17 @@import "./other.css";import { SANITIZER_DEFAULT_ALLOWED_TAGS } from "@triliumnext/commons";+import { useMemo } from "preact/hooks";+import { NO_SEARCH_ENGINE } from "../../../menus/note_context_menu";import { t } from "../../../services/i18n";import search from "../../../services/search";import server from "../../../services/server";import toast from "../../../services/toast";+import { Badge } from "../../react/Badge";import Button from "../../react/Button";import { Card, CardSection, OptionCardSection } from "../../react/Card";-import { FormTextBoxWithUnit } from "../../react/FormTextBox";+import FormTextBox, { FormTextBoxWithUnit } from "../../react/FormTextBox";import FormToggle from "../../react/FormToggle";import { useTriliumOption, useTriliumOptionBool, useTriliumOptionJson } from "../../react/hooks";import OptionsPageHeader from "./components/OptionsPageHeader";@@ -19,6 +22,7 @@ export default function OtherSettings() {<><OptionsPageHeader /><SearchSettings />+ <SearchEngineSettings /><NoteErasureTimeout /><AttachmentErasureTimeout /><RevisionSettings />@@ -54,6 +58,68 @@ function SearchSettings() {);}+function SearchEngineSettings() {+ const [ customSearchEngineName, setCustomSearchEngineName ] = useTriliumOption("customSearchEngineName");+ const [ customSearchEngineUrl, setCustomSearchEngineUrl ] = useTriliumOption("customSearchEngineUrl");++ const searchEngines = useMemo(() => {+ return [+ { 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: NO_SEARCH_ENGINE, name: "", label: t("search_engine.none"), icon: "bx bx-block" }+ ];+ }, []);++ return (+ <Card+ heading={t("search_engine.title")}+ description={t("search_engine.custom_search_engine_info")}+ >+ <OptionCardSection label={t("search_engine.predefined_templates_label")}>+ <div className="search-engine-templates">+ {searchEngines.map(engine => (+ <Badge+ key={engine.url}+ icon={engine.icon}+ text={engine.label ?? engine.name}+ className={customSearchEngineUrl === engine.url ? "selected" : ""}+ onClick={() => {+ setCustomSearchEngineName(engine.name);+ setCustomSearchEngineUrl(engine.url);+ }}+ />+ ))}+ </div>+ </OptionCardSection>++ <OptionCardSection+ className="search-engine-name"+ name="custom-name"+ label={t("search_engine.custom_name_label")}+ >+ <FormTextBox+ currentValue={customSearchEngineName} onBlur={setCustomSearchEngineName}+ placeholder={t("search_engine.custom_name_placeholder")}+ />+ </OptionCardSection>++ <OptionCardSection+ name="custom-url"+ label={t("search_engine.custom_url_label")}+ description={t("search_engine.custom_url_description")}+ stacked+ >+ <FormTextBox+ currentValue={customSearchEngineUrl} onBlur={setCustomSearchEngineUrl}+ placeholder={t("search_engine.custom_url_placeholder")}+ />+ </OptionCardSection>+ </Card>+ );+}+function NoteErasureTimeout() {return (<Carddiff --git a/apps/server/src/assets/help/help_content.json b/apps/server/src/assets/help/help_content.jsonindex d32484a803..e85ad1d556 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>.<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_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 in <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Other</em>) 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 8b44adcf4e..57e7ab3ae7 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@@ -6,7 +6,7 @@ Right-clicking the content of some note types such as <a class="reference-link"## Features* 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).+* The selected text can be searched either with a search engine (configured in <a class="reference-link" href="Options.md">Options</a> → _Other_) 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>.