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(links): choose between a note and a web link in Add link
Elian Doranbd3b2a17fd4e
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.jsonindex 75b9b1f0a5..bd06a824ca 100644--- a/apps/client/src/translations/en/translation.json+++ b/apps/client/src/translations/en/translation.json@@ -67,7 +67,9 @@"anchor_none": "None (link to note)","button_add_link": "Add link","button_edit_link": "Save link",- "button_fix_link": "Fix link"+ "button_fix_link": "Fix link",+ "web_link": "Web link",+ "url": "URL"},"branch_prefix": {"edit_branch_prefix": "Edit branch prefix",diff --git a/apps/client/src/widgets/dialogs/add_link.css b/apps/client/src/widgets/dialogs/add_link.cssnew file mode 100644index 0000000000..e103ba100d--- /dev/null+++ b/apps/client/src/widgets/dialogs/add_link.css@@ -0,0 +1,3 @@+.modal.add-link-dialog .add-link-target {+ margin-bottom: 1rem;+}diff --git a/apps/client/src/widgets/dialogs/add_link.spec.tsx b/apps/client/src/widgets/dialogs/add_link.spec.tsxnew file mode 100644index 0000000000..6d6f758af5--- /dev/null+++ b/apps/client/src/widgets/dialogs/add_link.spec.tsx@@ -0,0 +1,158 @@+import { act } from "preact/test-utils";+import { beforeEach, describe, expect, it, vi } from "vitest";++import Component from "../../components/component";+import type { Suggestion } from "../../services/note_autocomplete";+import { buildNote } from "../../test/easy-froca";+import { renderInto } from "../../test/render";+import { ParentComponent } from "../react/react_utils";+import AddLinkDialog, { type AddLinkOpts, normalizeWebLink } from "./add_link";++const autocomplete = vi.hoisted(() => ({+ onChange: undefined as ((suggestion: Suggestion | null) => void) | undefined+}));++vi.mock("../../services/i18n", () => ({ t: (key: string) => key }));+vi.mock("../react/NoteAutocomplete", () => ({+ default: ({ onChange }: { onChange: (suggestion: Suggestion | null) => void }) => {+ autocomplete.onChange = onChange;+ return <input className="note-autocomplete" />;+ }+}));++describe("normalizeWebLink", () => {+ it("adds https:// to an address without a scheme, and keeps any other scheme", () => {+ expect(normalizeWebLink(" example.com/a ")).toBe("https://example.com/a");+ expect(normalizeWebLink("localhost:8080")).toBe("https://localhost:8080");+ expect(normalizeWebLink("http://example.com")).toBe("http://example.com");+ expect(normalizeWebLink("mailto:[email protected]")).toBe("mailto:[email protected]");+ expect(normalizeWebLink(" ")).toBeNull();+ });+});++describe("AddLinkDialog", () => {+ let host: Component;+ let container: HTMLElement;+ const addLink = vi.fn<AddLinkOpts["addLink"]>(async () => {});++ beforeEach(() => {+ vi.clearAllMocks();+ autocomplete.onChange = undefined;+ host = new Component();+ container = renderInto(+ <ParentComponent.Provider value={host}>+ <AddLinkDialog />+ </ParentComponent.Provider>+ );+ });++ async function open(opts: Partial<AddLinkOpts> = {}) {+ await act(async () => {+ void host.handleEventInChildren("showAddLinkDialog", {+ text: "", hasSelection: false, addLink, ...opts+ });+ });+ }++ function choice() {+ return [ ...container.querySelectorAll<HTMLButtonElement>(".tn-segmented-choice button") ];+ }++ function current() {+ return choice().find((button) => button.classList.contains("active"))?.textContent?.trim();+ }++ function field(name: "url" | "text") {+ return container.querySelector<HTMLInputElement>(`.add-link-${name} input`);+ }++ async function type(input: HTMLInputElement | null, value: string) {+ if (!input) throw new Error("The field is not shown.");+ await act(async () => {+ input.value = value;+ input.dispatchEvent(new Event("input", { bubbles: true }));+ });+ }++ async function submit() {+ const form = container.querySelector("form");+ const modal = container.querySelector(".modal");+ if (!form || !modal) throw new Error("The dialog has no form.");+ await act(async () => {+ form.dispatchEvent(new Event("submit", { bubbles: true, cancelable: true }));+ modal.dispatchEvent(new Event("hidden.bs.modal"));+ });+ }++ it("inserts a typed web link, titled by its URL unless given a text", async () => {+ await open();+ expect(choice().map((button) => button.textContent?.trim()))+ .toStrictEqual([ "add_link.note", "add_link.web_link" ]);+ expect(current()).toBe("add_link.note");+ expect(container.querySelector(".note-autocomplete")).not.toBeNull();++ await act(async () => choice()[1]?.click());+ expect(current()).toBe("add_link.web_link");+ expect(container.querySelector(".note-autocomplete")).toBeNull();+ expect(field("url")?.inputMode).toBe("url");++ await type(field("url"), "example.com");+ await submit();+ expect(addLink)+ .toHaveBeenLastCalledWith("https://example.com", "https://example.com", true);++ await open();+ await act(async () => choice()[1]?.click());+ await type(field("url"), "https://trilium.cc");+ await type(field("text"), "Trilium");+ await submit();+ expect(addLink).toHaveBeenLastCalledWith("https://trilium.cc", "Trilium", true);+ });++ it("still links a note picked on the note side", async () => {+ const note = buildNote({ title: "Target" });+ await open();+ await act(async () => autocomplete.onChange?.({ notePath: `root/${note.noteId}` }));+ await submit();+ expect(addLink).toHaveBeenCalledExactlyOnceWith(`root/${note.noteId}`, null);+ });++ it("opens on the web link side for an edited external link or a selected URL", async () => {+ await open({ currentLink: { externalLink: "https://example.com/page" } });+ expect(current()).toBe("add_link.web_link");+ expect(field("url")?.value).toBe("https://example.com/page");++ await open({ text: "https://example.org", hasSelection: true });+ expect(current()).toBe("add_link.web_link");+ expect(field("url")?.value).toBe("https://example.org");+ // The selected text is the link's text.+ expect(field("text")).toBeNull();++ await open({ text: "some words", hasSelection: true });+ expect(current()).toBe("add_link.note");+ });++ it("moves a URL typed or pasted on the note side over to the web link side", async () => {+ await open();+ await act(async () => autocomplete.onChange?.({ externalLink: "https://typed.example" }));+ expect(current()).toBe("add_link.web_link");+ expect(field("url")?.value).toBe("https://typed.example");++ await open();+ const paste = new Event("paste", { bubbles: true, cancelable: true });+ const clipboardData = { getData: () => " https://pasted.example " };+ Object.defineProperty(paste, "clipboardData", { value: clipboardData });+ await act(async () => {+ container.querySelector(".note-autocomplete")?.dispatchEvent(paste);+ });+ expect(paste.defaultPrevented).toBe(true);+ expect(current()).toBe("add_link.web_link");+ expect(field("url")?.value).toBe("https://pasted.example");+ });++ it("offers no web link when fixing a link to a missing note", async () => {+ await open({ text: "Gone", fixLink: true });+ expect(choice()).toStrictEqual([]);+ expect(container.querySelector(".note-autocomplete")).not.toBeNull();+ });+});diff --git a/apps/client/src/widgets/dialogs/add_link.tsx b/apps/client/src/widgets/dialogs/add_link.tsxindex 4db5f51bde..cef498c456 100644--- a/apps/client/src/widgets/dialogs/add_link.tsx+++ b/apps/client/src/widgets/dialogs/add_link.tsx@@ -1,19 +1,27 @@-import { t } from "../../services/i18n";-import Modal from "../react/Modal";-import Button from "../react/Button";-import FormRadioGroup from "../react/FormRadioGroup";-import NoteAutocomplete, { type NoteAutocompleteHandle } from "../react/NoteAutocomplete";-import { useRef, useState, useEffect } from "preact/hooks";-import tree from "../../services/tree";+import "./add_link.css";++import { useEffect, useRef, useState } from "preact/hooks";+import froca from "../../services/froca";+import { t } from "../../services/i18n";import type { Suggestion } from "../../services/note_autocomplete";+import tree from "../../services/tree";import { logError } from "../../services/ws";+import Button from "../react/Button";import FormGroup from "../react/FormGroup.js";-import { refToJQuerySelector } from "../react/react_utils";+import FormRadioGroup from "../react/FormRadioGroup";+import FormTextBox from "../react/FormTextBox";import { useTriliumEvent } from "../react/hooks";+import Modal from "../react/Modal";+import NoteAutocomplete, { type NoteAutocompleteHandle } from "../react/NoteAutocomplete";+import { refToJQuerySelector } from "../react/react_utils";+import SegmentedChoice from "../react/SegmentedChoice";type LinkType = "reference-link" | "external-link" | "hyper-link";+/** What the link points at: a note, or an address outside Trilium. */+type LinkTarget = "note" | "url";+function findAnchorIds(content: string): string[] {const re = /<a\b([^>]*)>(<\/a>)?/g;const ids: string[] = [];@@ -71,7 +79,10 @@ export default function AddLinkDialog() {const [ selectedBookmark, setSelectedBookmark ] = useState("");const [ noteTitle, setNoteTitle ] = useState("");const [ shown, setShown ] = useState(false);+ const [ target, setTarget ] = useState<LinkTarget>("note");+ const [ webLink, setWebLink ] = useState("");const hasSubmittedRef = useRef(false);+ const webLinkRef = useRef<HTMLInputElement>(null);useTriliumEvent("showAddLinkDialog", opts => {setOpts(opts);@@ -85,12 +96,45 @@ export default function AddLinkDialog() {setLinkType("reference-link");}+ const initialWebLink = opts ? getInitialWebLink(opts) : null;+ setTarget(initialWebLink !== null ? "url" : "note");+ setWebLink(initialWebLink ?? "");+ setLinkTitle("");+// Taken as though it had just been picked, so that a dialog opened on a link and left alone// has one to apply — and so that everything a pick settles (the title, the anchors a note// offers, whether it is a link outside Trilium at all) is settled for it as well.- setSuggestion(opts?.currentLink ?? null);+ const initialLink = initialWebLink !== null ? normalizeWebLink(initialWebLink) : null;+ setSuggestion(opts?.currentLink ?? (initialLink ? { externalLink: initialLink } : null));}, [ opts ]);+ function changeWebLink(text: string) {+ setWebLink(text);+ const link = normalizeWebLink(text);+ setSuggestion(link ? { externalLink: link } : null);+ }++ function changeTarget(next: LinkTarget, text = "") {+ setTarget(next);+ setNoteTitle("");+ setLinkTitle("");+ setLinkType(opts?.hasSelection ? "hyper-link" : "reference-link");+ if (next === "url") {+ changeWebLink(text);+ } else {+ setWebLink("");+ setSuggestion(null);+ }+ }++ useEffect(() => {+ if (target === "url") {+ webLinkRef.current?.focus();+ } else {+ autocompleteRef.current?.focus();+ }+ }, [ target ]);+async function setDefaultLinkTitle(noteId: string) {const title = await tree.getNoteTitle(noteId);setNoteTitle(title);@@ -138,7 +182,6 @@ export default function AddLinkDialog() {}if (suggestion.externalLink) {- setLinkTitle(suggestion.externalLink);setLinkType("external-link");}@@ -154,6 +197,12 @@ export default function AddLinkDialog() {}, [selectedBookmark, noteTitle]);async function onShown() {+ if (target === "url") {+ webLinkRef.current?.focus();+ webLinkRef.current?.select();+ return;+ }+const $autocompleteEl = refToJQuerySelector(autocompleteRef);const currentNotePath = opts?.currentLink?.notePath;const currentNoteId = currentNotePath && tree.getNoteIdFromUrl(currentNotePath);@@ -196,53 +245,63 @@ export default function AddLinkDialog() {const buttonText = opts?.fixLink ? t("add_link.button_fix_link"): opts?.currentLink ? t("add_link.button_edit_link") : t("add_link.button_add_link");- return (- <Modal- className="add-link-dialog"- size="lg"- maxWidth={1000}- title={title}- helpPageId="QEAPj01N5f7w"- footer={<Button text={buttonText} keyboardShortcut="Enter" />}- onSubmit={onSubmit}- onShown={onShown}- onHidden={() => {- // Insert the link.- if (hasSubmittedRef.current && suggestion && opts) {- hasSubmittedRef.current = false;-- if (suggestion.notePath) {- // Handle note link, optionally with a bookmark anchor- const path = selectedBookmark- ? `${suggestion.notePath}?bookmark=${encodeURIComponent(selectedBookmark)}`- : suggestion.notePath;- opts.addLink(path, linkType === "reference-link" ? null : linkTitle);- } else if (suggestion.externalLink) {- // Handle external link- opts.addLink(suggestion.externalLink, linkTitle, true);- }- }-- setSuggestion(null);- setBookmarks([]);- setSelectedBookmark("");- setNoteTitle("");- setShown(false);- }}- show={shown}- >- <FormGroup label={t("add_link.note")} name="note">- <NoteAutocomplete- inputRef={autocompleteRef}- handleRef={handleRef}- onChange={setSuggestion}- opts={{- allowExternalLinks: !opts?.fixLink,- allowCreatingNotes: true- }}+ const webLinkFields = (+ <>+ <FormGroup className="add-link-url" label={t("add_link.url")} name="url">+ <FormTextBox+ inputRef={webLinkRef}+ inputMode="url"+ autoCapitalize="off"+ autoCorrect="off"+ spellcheck={false}+ placeholder="https://"+ currentValue={webLink}+ onChange={changeWebLink}/></FormGroup>+ {!opts?.hasSelection && !opts?.targetOnly && (+ <FormGroup+ className="add-link-text" label={t("add_link.link_title")} name="link-title"+ >+ <FormTextBox+ currentValue={linkTitle}+ placeholder={suggestion?.externalLink}+ onChange={setLinkTitle}+ />+ </FormGroup>+ )}+ </>+ );++ const noteFields = (+ <>+ <div+ onPaste={(e) => {+ if (opts?.fixLink) return;+ const text = e.clipboardData?.getData("text/plain").trim();+ if (text && hasScheme(text)) {+ e.preventDefault();+ changeTarget("url", text);+ }+ }}+ >+ <FormGroup label={t("add_link.note")} name="note">+ <NoteAutocomplete+ inputRef={autocompleteRef}+ handleRef={handleRef}+ // A URL picked from the search belongs on the web link side.+ onChange={(picked) => (picked?.externalLink+ ? changeTarget("url", picked.externalLink)+ : setSuggestion(picked))}+ opts={{+ allowExternalLinks: !opts?.fixLink,+ allowCreatingNotes: true+ }}+ />+ </FormGroup>+ </div>+{bookmarks.length > 0 && !opts?.targetOnly && (<FormGroup label={t("add_link.anchor")} name="anchor"><select@@ -289,6 +348,85 @@ export default function AddLinkDialog() {))}</div>)}+ </>+ );++ return (+ <Modal+ className="add-link-dialog"+ size="lg"+ maxWidth={1000}+ title={title}+ helpPageId="QEAPj01N5f7w"+ footer={<Button text={buttonText} keyboardShortcut="Enter" />}+ onSubmit={onSubmit}+ onShown={onShown}+ onHidden={() => {+ // Insert the link.+ if (hasSubmittedRef.current && suggestion && opts) {+ hasSubmittedRef.current = false;++ if (suggestion.notePath) {+ // Handle note link, optionally with a bookmark anchor+ const path = selectedBookmark+ ? `${suggestion.notePath}?bookmark=${encodeURIComponent(selectedBookmark)}`+ : suggestion.notePath;+ opts.addLink(path, linkType === "reference-link" ? null : linkTitle);+ } else if (suggestion.externalLink) {+ // An external link without a text of its own reads as its address.+ const text = linkTitle.trim() || suggestion.externalLink;+ opts.addLink(suggestion.externalLink, text, true);+ }+ }++ setSuggestion(null);+ setBookmarks([]);+ setSelectedBookmark("");+ setNoteTitle("");+ setShown(false);+ }}+ show={shown}+ >+ {!opts?.fixLink && (+ <SegmentedChoice<LinkTarget>+ className="add-link-target"+ options={[+ { value: "note", label: t("add_link.note"), icon: "bx-note" },+ { value: "url", label: t("add_link.web_link"), icon: "bx-globe" }+ ]}+ currentValue={target}+ onChange={(next) => changeTarget(next)}+ />+ )}++ {target === "url" ? webLinkFields : noteFields}</Modal>);}++/**+ * The address the dialog opens on, on the web link side: the external link being edited, or a+ * selected text that is a URL. `null` opens it on the note side.+ */+function getInitialWebLink(opts: AddLinkOpts): string | null {+ if (opts.fixLink) return null;+ if (opts.currentLink) return opts.currentLink.externalLink ?? null;+ const text = opts.text.trim();+ return opts.hasSelection && hasScheme(text) ? text : null;+}++/** Whether `text` is a whole URL with a scheme, the way the note search tells URLs apart. */+function hasScheme(text: string) {+ return /^[a-z][a-z0-9+.-]*:\/\/\S+$/i.test(text);+}++/**+ * The link for an address as typed: trimmed, and with `https://` before an address that names no+ * scheme, as CKEditor's `link.defaultProtocol` does. `null` for an empty one.+ */+export function normalizeWebLink(text: string): string | null {+ const link = text.trim();+ if (!link) return null;+ // A colon followed by a digit is a port, as in `localhost:8080`, not the end of a scheme.+ return /^[a-z][a-z0-9+.-]*:(?!\d)/i.test(link) ? link : `https://${link}`;+}diff --git a/apps/server/src/assets/help/help_content.json b/apps/server/src/assets/help/help_content.jsonindex 30e8cb23b3..b1a151b9c6 100644--- a/apps/server/src/assets/help/help_content.json+++ b/apps/server/src/assets/help/help_content.json@@ -140,7 +140,7 @@"_help_oiVPnW8QfnvS": "<h2>Trilium-specific shortcuts</h2><figure class=\"table\"><table><thead><tr><th>Action</th><th>PC</th><th>Mac</th></tr></thead><tbody><tr><td>Bring up inline formatting toolbar (arrow keys ←,→ to navigate, Enter to apply)</td><td>Alt+F10</td><td>⌥+F10</td></tr><tr><td>Bring up block formatting toolbar</td><td>Alt+F10</td><td>⌥+F10</td></tr><tr><td>Create <a href=\"#root/_help_QEAPj01N5f7w\">external link</a></td><td>Ctrl+K</td><td>⌘+K</td></tr><tr><td>Create <a href=\"#root/_help_QEAPj01N5f7w\">internal (note) link</a></td><td>Ctrl+L</td><td>⌘+L</td></tr><tr><td>Inserts current date and time at caret position</td><td>Alt+T</td><td>⌥+T</td></tr><tr><td>Increase paragraph indentation</td><td>Tab</td><td>⇥</td></tr><tr><td>Decrease paragraph indentation</td><td>Shift + Tab</td><td>⇧ + ⇥</td></tr><tr><td>Mark selected text as <a href=\"#root/_help_UYuUB1ZekNQU\">keyboard shortcut</a></td><td>Ctrl + Alt + K</td><td>⌘+ ⌥+ K</td></tr><tr><td>Insert <a class=\"reference-link\" href=\"#root/_help_YfYAtQBcfo5V\">Math Equations</a></td><td>Ctrl + M</td><td>⌘+ M</td></tr><tr><td>Move blocks (lists, paragraphs, etc.) up, or in a <a href=\"#root/_help_NdowYOC1GFKS\">table</a> the rows</td><td>Alt+↑</td><td>⌥+↑</td></tr><tr><td>Move blocks (lists, paragraphs, etc.) down, or in a <a href=\"#root/_help_NdowYOC1GFKS\">table</a> the rows</td><td>Alt+↓</td><td>⌥+↓</td></tr><tr><td>Move the selected content to another column of a <a class=\"reference-link\" href=\"#root/_help_wYDzQ1fBFgfT\">Multicolumn layout</a></td><td>Ctrl+←, Ctrl+→, Ctrl+Shift+Home, Ctrl+Shift+End</td><td>⌘+←, ⌘+→, ⌘+⇧+Home, ⌘+⇧+End</td></tr><tr><td>Move the current column of a multicolumn layout</td><td>Ctrl+Alt+←, Ctrl+Alt+→, Ctrl+Alt+Home, Ctrl+Alt+End</td><td>⌘+⌥+←, ⌘+⌥+→, ⌘+⌥+Home, ⌘+⌥+End</td></tr><tr><td>Add a column after or before the current one in a multicolumn layout</td><td>Ctrl+Enter, Ctrl+Shift+Enter</td><td>⌘+Enter, ⌘+⇧+Enter</td></tr><tr><td>Move the selected content to another tab in <a class=\"reference-link\" href=\"#root/_help_EK2ckIZ74tbT\">Content tabs</a></td><td>Ctrl+←, Ctrl+→, Ctrl+Shift+Home, Ctrl+Shift+End</td><td>⌘+←, ⌘+→, ⌘+⇧+Home, ⌘+⇧+End</td></tr><tr><td>Move the current tab of a tabs block</td><td>Ctrl+Alt+←, Ctrl+Alt+→, Ctrl+Alt+Home, Ctrl+Alt+End</td><td>⌘+⌥+←, ⌘+⌥+→, ⌘+⌥+Home, ⌘+⌥+End</td></tr><tr><td>Add a tab after or before the current one in a tabs block</td><td>Ctrl+Enter, Ctrl+Shift+Enter</td><td>⌘+Enter, ⌘+⇧+Enter</td></tr></tbody></table></figure><h2>Common shortcuts</h2><aside class=\"admonition tip\"><p>This section of keyboard shortcuts presents a subset of the keyboard shortcuts as supported by the editor technology we are using, <a class=\"reference-link\" href=\"#root/_help_MI26XDLSAlCD\">CKEditor</a>. The shortcuts were taken from the <a href=\"https://ckeditor.com/docs/ckeditor5/latest/features/accessibility.html#keyboard-shortcuts\">official documentation</a>. Note that not all the shortcuts in the original documentation are applicable (due to using a different configuration).</p></aside><h3>Content editing</h3><figure class=\"table\"><table><thead><tr><th>Action</th><th>PC</th><th>Mac</th></tr></thead><tbody><tr><td>Insert a hard break (a new paragraph)</td><td>Enter</td><td></td></tr><tr><td>Insert a soft break (a <code><br></code> element)</td><td>Shift+Enter</td><td>⇧Enter</td></tr><tr><td>Copy selected content</td><td>Ctrl+C</td><td>⌘C</td></tr><tr><td>Paste content</td><td>Ctrl+V</td><td>⌘V</td></tr><tr><td>Paste content as plain text</td><td>Ctrl+Shift+V</td><td>⌘⇧V</td></tr><tr><td>Undo</td><td>Ctrl+Z</td><td>⌘Z</td></tr><tr><td>Redo</td><td>Ctrl+Y, Ctrl+Shift+Z</td><td>⌘Y, ⌘⇧Z</td></tr><tr><td>Bold text</td><td>Ctrl+B</td><td>⌘B</td></tr><tr><td>Change text case</td><td>Shift+F3</td><td>⇧F3 (may require Fn)</td></tr><tr><td>Create link</td><td>Ctrl+K</td><td>⌘K</td></tr><tr><td>Move out of a link</td><td>←←, →→</td><td></td></tr><tr><td>Move out of an inline code style</td><td>←←, →→</td><td></td></tr><tr><td>Select all</td><td>Ctrl+A</td><td>⌘A</td></tr><tr><td>Find in the document</td><td>Ctrl+F</td><td>⌘F</td></tr><tr><td>Copy text formatting</td><td>Ctrl+Shift+C</td><td>⌘⇧C</td></tr><tr><td>Paste text formatting</td><td>Ctrl+Shift+V</td><td>⌘⇧V</td></tr><tr><td>Italic text</td><td>Ctrl+I</td><td>⌘I</td></tr><tr><td>Strikethrough text</td><td>Ctrl+Shift+X</td><td>⌘⇧X</td></tr><tr><td>Underline text</td><td>Ctrl+U</td><td>⌘U</td></tr><tr><td>Revert autoformatting action</td><td>Backspace</td><td></td></tr></tbody></table></figure><h3>Interacting with blocks</h3><p>Blocks are images, tables, blockquotes, annotations.</p><figure class=\"table\"><table><thead><tr><th>Action</th><th>PC</th><th>Mac</th></tr></thead><tbody><tr><td>Insert a new paragraph directly after a widget</td><td>Enter</td><td></td></tr><tr><td>Insert a new paragraph directly before a widget</td><td>Shift+Enter</td><td>⇧Enter</td></tr><tr><td>Move the caret to allow typing directly before a widget</td><td>↑, ←</td><td></td></tr><tr><td>Move the caret to allow typing directly after a widget</td><td>↓, →</td><td></td></tr><tr><td>After entering a nested editable, move the selection to the closest ancestor widget. For example: move from an image caption to the whole image widget.</td><td>Tab then Esc</td><td></td></tr></tbody></table></figure><p>Specifically for lists:</p><figure class=\"table\"><table><thead><tr><th>Action</th><th>PC</th><th>Mac</th></tr></thead><tbody><tr><td>Increase list item indent</td><td>⇥</td><td></td></tr><tr><td>Decrease list item indent</td><td>Shift+⇥</td><td>⇧⇥</td></tr></tbody></table></figure><p>In tables:</p><figure class=\"table\"><table><thead><tr><th>Action</th><th>PC</th><th>Mac</th></tr></thead><tbody><tr><td>Move the selection to the next cell</td><td>⇥</td><td></td></tr><tr><td>Move the selection to the previous cell</td><td>Shift+⇥</td><td>⇧⇥</td></tr><tr><td>Insert a new table row (when in the last cell of a table)</td><td>⇥</td><td></td></tr><tr><td>Navigate through the table</td><td>↑, →, ↓, ←</td><td></td></tr></tbody></table></figure><h3>General UI shortcuts</h3><figure class=\"table\"><table><thead><tr><th>Action</th><th>PC</th><th>Mac</th></tr></thead><tbody><tr><td>Close contextual balloons, dropdowns, and dialogs</td><td>Esc</td><td></td></tr><tr><td>Open the accessibility help dialog</td><td>Alt+0</td><td>⌥0</td></tr><tr><td>Move focus between form fields (inputs, buttons, etc.)</td><td>⇥, Shift+⇥</td><td>⇥, ⇧⇥</td></tr><tr><td>Move focus to the toolbar, navigate between toolbars</td><td>Alt+F10</td><td>⌥F10 (may require Fn)</td></tr><tr><td>Navigate through the toolbar or menu bar</td><td>↑, →, ↓, ←</td><td></td></tr><tr><td>Navigate to the next focusable field or an element outside the editor</td><td>Tab, Shift+Tab</td><td></td></tr><tr><td>Execute the currently focused button. Executing buttons that interact with the editor content moves the focus back to the content.</td><td>Enter, Space</td><td></td></tr><tr><td>Move focus in and out of an active dialog window</td><td>Ctrl+F6</td><td>⌘F6 (may require Fn)</td></tr></tbody></table></figure>","_help_UmgZAfcltxkS": "<p>Link previews turn a pasted URL into a rich, metadata-aware widget that can be displayed in three visual modes:</p><h2>Display modes</h2><p>A link preview can be displayed in one of three modes:</p><ul><li><strong>Inline</strong> — a link showing the site's favicon and page title (quite similar to <a class=\"reference-link\" href=\"#root/_help_hrZ1D00cLbal\">Internal (reference) links</a>). Use this when you want the link to flow with the surrounding paragraph.</li><li><strong>Card</strong> — a block-level preview with thumbnail, title, description, and site name. Use this when the link is the focus of a paragraph.</li><li><strong>Embed</strong> — a block-level interactive embed.<ul><li>Currently supported for YouTube videos, which render interactively (via an <code>iframe</code>).</li><li>To prevent unwanted remote requests, the video is shown only after clicking on it first.</li></ul></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"image image_resized\" style=\"width:100%;\"><img style=\"aspect-ratio:251/42;\" src=\"{{helpAssets}}/User%20Guide/Note%20Types/Text/Link%20Previews_image.png\" width=\"251\" height=\"42\"><figcaption><em>Inline</em> link preview</figcaption></figure></div><div class=\"trilium-multicolumn-column\"><figure class=\"image image_resized\" style=\"width:100%;\"><img style=\"aspect-ratio:1217/196;\" src=\"{{helpAssets}}/User%20Guide/Note%20Types/Text/2_Link%20Previews_image.png\" width=\"1217\" height=\"196\"><figcaption><em>Card</em> link preview</figcaption></figure></div><div class=\"trilium-multicolumn-column\"><figure class=\"image image_resized\" style=\"width:100%;\"><img style=\"aspect-ratio:994/563;\" src=\"{{helpAssets}}/User%20Guide/Note%20Types/Text/1_Link%20Previews_image.png\" width=\"994\" height=\"563\"><figcaption><em>Embed</em> link preview</figcaption></figure></div></div><h2>Inserting a link preview</h2><p>There are three ways to create one:</p><h3>1. By pasting a URL</h3><p>A link preview is automatically created:</p><ul><li>By pasting the URL and pressing <kbd>Space</kbd>. This will create an <em>inline</em> link preview.</li><li>When at the start of a new paragraph, pressing <kbd>Enter</kbd> will create a <em>card</em> or an <em>embed</em> for YouTube URLs.</li></ul><p>To undo an automatic link preview, press <kbd>Ctrl</kbd>+<kbd>Z</kbd> immediately afterwards which keeps it as a plain link instead. Alternatively, once a link preview was created, click on the link and select <em>Plain link</em> from the link preview toolbar.</p><p>This automatic conversion can be disabled by going to <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Text Notes</em> and unchecking <em>Autogenerate link previews</em> from the <em>Features</em> section.</p><p>If the link is not accessible to the Trilium server (or the network request fails for any other reason), it will not be converted to a link preview.</p><aside class=\"admonition note\"><p>A URL is only auto-converted when the pasted text <em>is</em> the URL. Links with a display name (e.g. <a href=\"https://triliumnotes.org\">Trilium Notes website</a>) are left as plain links.</p></aside><h3>2. By using the \"Link preview\" toolbar button</h3><p>Click <em>Link preview</em> (<span class=\"tn-icon cke cke-trilium-link-preview\"></span>) in the formatting toolbar to open the <em>Link preview</em> popup. Paste the URL and choose the type of preview.</p><h3>3. By saving browser tabs from the Web Clipper</h3><p>When the <a class=\"reference-link\" href=\"#root/_help_MtPxeAWVAzMg\">Web Clipper</a> saves the tabs of a window, each tab becomes an <em>inline</em> link preview showing the title and favicon the browser displays for it. Because this data comes from the browser, pages behind a login keep their real title, and the Trilium server does not contact the saved pages.</p><p>When <em>Autogenerate link previews</em> is turned off, the tabs are saved as a list of plain links instead.</p><h2>Altering an existing link preview</h2><p>Click on an inserted link preview to select it, and a small toolbar will appear with the following options:</p><ul><li>The normal link operations (opening in a new tab, copying the link, unlinking).</li><li>A button to edit the title of the link preview. This is especially useful if the title is hidden behind a login screen.</li><li>A way to switch between the link preview modes (Inline, Card or Embed) as well as to convert it to a normal link instead.<ul><li>The Embed option is only enabled when the URL points to a supported service (YouTube today).</li></ul></li></ul><h2>Where the preview data comes from</h2><p>When you insert a link preview, Trilium fetches metadata once and stores it inside the note's HTML:</p><ul><li><strong>YouTube URLs</strong> — title, channel name, and thumbnail are fetched via YouTube's public oEmbed endpoint.</li><li><strong>All other URLs</strong> — Trilium fetches the page and reads OpenGraph tags (<code>og:title</code>, <code>og:description</code>, <code>og:image</code>, <code>og:site_name</code>), falling back to the page's <code><title></code> and <code><meta name=\"description\"></code>. The site's favicon is downloaded and inlined.</li></ul><p>Because the data is stored in the note itself, link previews continue to render correctly when you reopen the note, share/publish it, or export to HTML — without any further network requests.</p><p>The metadata is captured <strong>at insertion time</strong> and is not automatically refreshed. If the linked page later changes its title or thumbnail, you'll need to re-insert the link to pick up the new values. To refresh a link, simply create it again.</p><p>When accessing a <a class=\"reference-link\" href=\"#root/_help_WOcw2SLH6tbX\">Server Installation</a>, the data is fetched from the remote URL by the server and not the client.</p><h2>Known limitations</h2><ul><li>The Embed display mode currently only supports YouTube. Other video and media platforms fall back to a Card preview.</li><li>Pages that block automated fetches may produce a minimal preview (hostname only).</li><li>Link previews require the Trilium server to reach the target URL, so they won't generate previews for pages on networks the server can't see.</li></ul>","_help_QEAPj01N5f7w": "<p>There are two types of links:</p><ul><li><a class=\"reference-link\" href=\"#root/_help_3IDVtesTQ8ds\">External links</a>, for standard hyperlinks to websites or other resources.</li><li><a class=\"reference-link\" href=\"#root/_help_hrZ1D00cLbal\">Internal (reference) links</a> for links to other notes within Trilium.<ul><li>The list of notes that refer to a particular note is called <a class=\"reference-link\" href=\"#root/_help_wfGXLmm7x27z\">Backlinks</a>.</li></ul></li></ul><h2>Note map</h2><p>Trilium provides a visualization of incoming and outgoing links for a particular note. See <a href=\"#root/_help_BCkXAVs63Ttv\">note map</a> for details.</p>",- "_help_3IDVtesTQ8ds": "<p>An external link is a standard web link targeting for example a website. For example, <a href=\"https://en.wikipedia.org/wiki/South_China_Sea\">https://en.wikipedia.org/wiki/South_China_Sea</a> is an external link to a Wikipedia page.</p><p>To create a link without a custom text:</p><ul><li>Press <span class=\"tn-icon cke cke-link\"></span> in the <a class=\"reference-link\" href=\"#root/_help_nRhnJkTT8cPs\">Formatting toolbar</a>:<ul><li>A popup will appear, type or paste the URL in the box.</li><li>Press <kbd>Enter</kbd> or the check mark icon to confirm.</li></ul></li><li>Alternatively, press <kbd>Ctrl</kbd>+<kbd>K</kbd> to trigger the aforementioned popup.</li><li>A simpler way is to paste the raw link and press space to turn it automatically into a link.</li></ul><p>To create a link with a custom text:</p><ul><li>First, type and select the text which will be turned into a link.</li><li>Follow the previous steps to open the link interface (via the formatting toolbar, or <kbd>Ctrl</kbd>+<kbd>K</kbd>).</li><li>Alternatively, simply paste (<kbd>Ctrl</kbd>+<kbd>V</kbd>) over the selected text to turn it into a link.</li></ul><p>Once a link is inserted:</p><ul><li>The text inside the link can be changed if needed but the link itself will remain.</li><li>To modify the link, click on the link to display the popup and press the <span class=\"tn-icon cke cke-pencil\"></span> <em>Edit link</em> button.</li><li>To remove a link, click on it and press the <span class=\"tn-icon cke cke-unlink\"></span> <em>Unlink</em> button.</li></ul><p>You can follow external link by either double clicking (will open new tab/window) it or right clicking on them and choosing \"Open in new tab\".</p>",+ "_help_3IDVtesTQ8ds": "<p>An external link is a standard web link targeting for example a website. For example, <a href=\"https://en.wikipedia.org/wiki/South_China_Sea\">https://en.wikipedia.org/wiki/South_China_Sea</a> is an external link to a Wikipedia page.</p><p>To create a link without a custom text:</p><ul><li>Press <span class=\"tn-icon cke cke-link\"></span> in the <a class=\"reference-link\" href=\"#root/_help_nRhnJkTT8cPs\">Formatting toolbar</a>:<ul><li>A popup will appear, type or paste the URL in the box.</li><li>Press <kbd>Enter</kbd> or the check mark icon to confirm.</li></ul></li><li>Alternatively, press <kbd>Ctrl</kbd>+<kbd>K</kbd> to trigger the aforementioned popup.</li><li>A simpler way is to paste the raw link and press space to turn it automatically into a link.</li><li>Since v0.107.0, the <em>Add link</em> dialog of <a class=\"reference-link\" href=\"#root/_help_hrZ1D00cLbal\">Internal (reference) links</a> (<kbd>Ctrl</kbd>+<kbd>L</kbd> or the <span class=\"tn-icon cke cke-trilium\"></span> button) creates external links as well. Select <em>Web link</em> at the top of the dialog, type or paste the address, and optionally a <em>Link title</em>; without one, the link shows its address. An address without a scheme, such as <code>example.com</code>, gets <code>https://</code>. A URL pasted into the <em>Note</em> field, or picked from its search, switches the dialog to <em>Web link</em>. The dialog also opens on <em>Web link</em> when the selected text is a URL.</li></ul><p>To create a link with a custom text:</p><ul><li>First, type and select the text which will be turned into a link.</li><li>Follow the previous steps to open the link interface (via the formatting toolbar, or <kbd>Ctrl</kbd>+<kbd>K</kbd>).</li><li>Alternatively, simply paste (<kbd>Ctrl</kbd>+<kbd>V</kbd>) over the selected text to turn it into a link.</li></ul><p>Once a link is inserted:</p><ul><li>The text inside the link can be changed if needed but the link itself will remain.</li><li>To modify the link, click on the link to display the popup and press the <span class=\"tn-icon cke cke-pencil\"></span> <em>Edit link</em> button.</li><li>To remove a link, click on it and press the <span class=\"tn-icon cke cke-unlink\"></span> <em>Unlink</em> button.</li></ul><p>You can follow external link by either double clicking (will open new tab/window) it or right clicking on them and choosing \"Open in new tab\".</p>","_help_hrZ1D00cLbal": "<p>Internal links are links to other notes within Trilium.</p><p>You can open an internal link by clicking it. You can also see a read-only preview of an internal link's contents by hovering over it.</p><h2>Inserting internal links</h2><p>Internal links can be created at the current position in a text note by:</p><ol><li>Pressing <kbd>Ctrl</kbd> + <kbd>L</kbd> or the <span class=\"tn-icon cke cke-trilium\"></span> button underneath the <span class=\"tn-icon cke cke-plus\"></span> menu in the <a class=\"reference-link\" href=\"#root/_help_nRhnJkTT8cPs\">Formatting toolbar</a>.</li><li>Searching for the title of the desired note to link. It's also possible to create new notes from this dialog by typing a non-existing note title and selecting either <em>Create note</em>, which places it in the <a class=\"reference-link\" href=\"#root/_help_S0Fos78ZfcY7\">Note Inbox</a> (today's day note, or the top level, when no inbox is set), or <em>Create child note</em>, which places it under the note being edited.</li></ol><p>There are two link types which you can select when creating the link to the note:</p><ol><li><em>Link title mirrors the note's current title</em><ol><li>This is sometimes also called \"reference link\".</li><li>The title of this link cannot be changed. Instead, it will always show the current title of the linked note.</li><li>The icon of the linked note will also be displayed.</li><li>If the linked note is deleted, the link keeps the last title it showed, in red and with a <span class=\"tn-icon bx bx-x\"></span> icon instead of the note icon. Clicking it while editing opens the <em>Fix link</em> dialog, which searches for that title; picking a note, or creating a new one, replaces the link with one to that note.</li></ol></li><li><em>Link title can be changed arbitrarily</em><ol><li>This will create a traditional hyperlink, where the text of the link can be different from the note title.</li></ol></li></ol><h2>In-place linking</h2><p>You can also insert internal links “inline” by using the <code>@</code> symbol:</p><ol><li>Type <code>@</code> in a text note, which will open the note search menu.</li><li>Search for the desired note's title by typing a few characters. Use <kbd>Up</kbd> and <kbd>Down</kbd> to select the correct note, and press <kbd>Enter</kbd> or <kbd>Tab</kbd> to create the link. It's also possible to create new notes with this method by typing a non-existing note title and selecting <em>Create note</em> or <em>Create child note</em>, as described above.</li></ol><h2>Pasting internal links</h2><p>You can also insert internal links by copying a note from the note tree.</p><ol><li>In the <a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a>, select a note and press <kbd>Ctrl</kbd> + <kbd>C</kbd>.</li><li>In a text note, paste the link by pressing <kbd>Ctrl</kbd> + <kbd>V</kbd>.</li></ol>","_help_wfGXLmm7x27z": "<p>A link points from one note to another; a <em>backlink</em> is that same connection seen from the other end: the list of notes that refer to the current one.</p><p>Backlinks are maintained automatically and are read-only from this side. A backlink disappears when the note that created it removes the link; it cannot be deleted from the note being pointed at.</p><h2>What counts as a backlink</h2><p>Any <a class=\"reference-link\" href=\"#root/_help_hrZ1D00cLbal\">Internal (reference) links</a> pointing at the current note, which covers two rather different cases:</p><ul><li>Relations that Trilium maintains on your behalf.<ul><li>The most common is <code>internalLink</code>, created whenever a note refers to another one through <a class=\"reference-link\" href=\"#root/_help_hrZ1D00cLbal\">Internal (reference) links</a> in its text.</li><li>Embedded images (<code>imageLink</code>), relation map connections (<code>relationMapLink</code>) and note inclusions (<code>includeNoteLink</code>) work the same way.</li></ul></li><li>Relations you define yourself.<ul><li>If another note has <code>~author</code> pointing at the current note, that note is listed here as well.</li></ul></li></ul><p>Relations coming from a <a class=\"reference-link\" href=\"#root/_help_m523cpzocqaD\">Saved Search</a> are excluded, since a search stores an <code>ancestor</code> relation that would otherwise list every one of its results as a backlink.</p><aside class=\"admonition note\"><p>Only some note types have their content scanned for links: <a class=\"reference-link\" href=\"#root/_help_iPIMuisry3hd\">Text</a>, <a class=\"reference-link\" href=\"#root/_help_6RM1Q7ppFVoj\">Markdown</a>, <a class=\"reference-link\" href=\"#root/_help_iRwzGnHPzonm\">Relation Map</a> and <a class=\"reference-link\" href=\"#root/_help_GBBMSlVSOIGP\">AI</a> chats. A link written inside a <a class=\"reference-link\" href=\"#root/_help_6f9hih2hXXZk\">Code</a> note is not registered and will not appear as a backlink on the target note. A relation set manually on a code note does still count.</p></aside><h2>How entries are displayed</h2><p>Each entry names the note the reference comes from, followed by one of:</p><ul><li><strong>An excerpt</strong> of the surrounding content, with the link itself highlighted. This is available for <a class=\"reference-link\" href=\"#root/_help_iPIMuisry3hd\">Text</a> notes and for <a class=\"reference-link\" href=\"#root/_help_GBBMSlVSOIGP\">AI</a> chat notes. Roughly 200 characters of context are quoted around the link, trimmed with an ellipsis where the surrounding text is longer, and images are left out.</li><li><strong>The name of the relation</strong>, for every other note type where the source cannot be quoted. This is the case for <a class=\"reference-link\" href=\"#root/_help_iRwzGnHPzonm\">Relation Map</a> notes and for any note carrying a relation you defined yourself.</li></ul><p>A note is listed once per reference it makes, so a note that links to the current one three times occupies three rows.</p><p>Of note:</p><ul><li>For AI chat notes, only the assistant's own prose is quoted. A chat that reached the note purely through tool calls has nothing to quote and is listed by relation name instead.</li><li>Excerpts are only generated for roughly the first 50 sources. On a heavily referenced note, the remaining entries fall back to showing the relation name.</li></ul><h2>Where backlinks are shown</h2><ul><li>In the <a class=\"reference-link\" href=\"#root/_help_KRlZFoIH0j6p\">Connections tab</a> of the <a class=\"reference-link\" href=\"#root/_help_RnaPdbciOfeq\">Right Sidebar</a>, as a dedicated section.</li><li>As a badge in the <a class=\"reference-link\" href=\"#root/_help_AlJ73vBCjWDw\">Status bar</a> showing the number of backlinks. The badge only appears when the note is being read normally (not in a revision or attachment view) and when there is at least one backlink; pressing it opens the section above.</li><li>In <a class=\"reference-link\" href=\"#root/_help_ZjLYv08Rp3qC\">Quick edit</a>, as a button with a link icon in the header of the popup, under the same conditions; its tooltip gives the number of backlinks. Pressing a backlink opens that note in the popup.</li><li>Incoming links are also drawn on the link map, see <a class=\"reference-link\" href=\"#root/_help_BCkXAVs63Ttv\">Note Map (Link map, Tree map)</a>.</li></ul>","_help_S6Xx8QIWTV66": "<p>There are three types of lists supported by text notes:</p><ul><li><span class=\"tn-icon cke cke-bulleted-list\"></span> Bulleted lists (also known as unordered lists).</li><li><span class=\"tn-icon cke cke-numbered-list\"></span> Numbered lists (or ordered lists).</li><li><span class=\"tn-icon cke cke-todo-list\"></span> To-do lists</li></ul><p>For bulleted and numbered lists, it's possible to configure an alternative marker such as squares or Roman numbering by pressing the <span class=\"tn-icon cke cke-dropdown-arrow\"></span> icon. For numbered lists, it's also possible to specify the number to start at or whether to count in reverse order.</p><h2>Keyboard interaction</h2><ul><li>To create a new list:<ul><li>Bulleted list: Start a line with <code>*</code> or <code>-</code> followed by a space;</li><li>Numbered list: Start a line with <code>1.</code> or <code>1)</code> followed by a space;</li><li>To-do list: Start a line with <code>- [ ]</code> for an unchecked item or <code>[x]</code> for a checked item.</li></ul></li><li>To create a new item in the list, press <kbd>Enter</kbd>.</li><li>To create a blank line within a list item, press <kbd>Shift</kbd>+<kbd>Enter</kbd>.</li><li>To exit out of the list, press <kbd>Enter</kbd> twice.</li><li>To merge two lists, simply delete the gap between them.</li><li>To create nested lists, simply use the <span class=\"tn-icon cke cke-indent\"></span> button (see <em>Indentation</em> in <a class=\"reference-link\" href=\"#root/_help_dEHYtoWWi8ct\">Other features</a>) or the <kbd>Tab</kbd> key. To decrease the nesting level for the current element, press <kbd>Shift</kbd>+<kbd>Tab</kbd>.</li></ul><h2>Headings, code blocks within lists</h2><p>It possible to add content-level blocks such as headings, code blocks, tables within lists, as follows:</p><figure class=\"table\"><table><tbody><tr><td>1</td><td><img src=\"{{helpAssets}}/User%20Guide/Note%20Types/Text/2_Lists_image.jpg\"></td><td>First, create a list.</td></tr><tr><td>2</td><td><img src=\"{{helpAssets}}/User%20Guide/Note%20Types/Text/4_Lists_image.jpg\"></td><td>Press Enter to create a new list item.</td></tr><tr><td>3</td><td><img src=\"{{helpAssets}}/User%20Guide/Note%20Types/Text/1_Lists_image.jpg\"></td><td>Press Backspace to get rid of the bullet point. Notice the cursor position.</td></tr><tr><td>4</td><td><img class=\"image_resized\" style=\"aspect-ratio:676/112;width:98.29%;\" src=\"{{helpAssets}}/User%20Guide/Note%20Types/Text/5_Lists_image.jpg\" width=\"676\" height=\"112\"></td><td>At this point, insert any desired block-level item such as a code block.</td></tr><tr><td>5</td><td><img class=\"image_resized\" style=\"aspect-ratio:675/129;width:94.22%;\" src=\"{{helpAssets}}/User%20Guide/Note%20Types/Text/3_Lists_image.jpg\" width=\"675\" height=\"129\"></td><td>To continue with a new bullet point, press Enter until the cursor moves to a new blank position.</td></tr><tr><td>6</td><td><img class=\"image_resized\" style=\"aspect-ratio:675/129;width:100%;\" src=\"{{helpAssets}}/User%20Guide/Note%20Types/Text/Lists_image.jpg\" width=\"675\" height=\"129\"></td><td>Press Enter once more to create the new bullet.</td></tr></tbody></table></figure><p>The same principle applies to all three list types (bullet, numbered and to-do).</p><h2>To-do lists</h2><p>See <a class=\"reference-link\" href=\"#root/_help_fASfBrYnquKU\">To-do Lists</a>.</p><h2>Collapsible lists</h2><p>Starting with Trilium v0.104.0, it is possible to collapse nested list items. This applies to bullet lists, numbered lists as well as to-do lists.</p><p>To collapse or expand a list item that has nested sub-items:</p><ul><li>Using the mouse, move the cursor over the list item and an arrow will appear to its left. Clicking it will toggle between collapsed and expanded.</li><li>For bullet lists and numbered lists, it's also possible to click directly on the marker (e.g. the bullet or the number) instead of on the arrow to collapse or expand it. This won't work for to-do lists since this would toggle the to-do instead.</li><li>Press <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>Enter</kbd> which will toggle the collapse/expand state for the item at the cursor position.</li></ul><p>Of note:</p><ul><li>Collapsed items always show the arrow to indicate its state.</li><li>The collapsed state is saved at note level and synced across instances, which means that it will restore after a refresh or reopening of the application.</li><li>The collapsed state is also persisted in <a class=\"reference-link\" href=\"#root/_help_mHbBMPDPkVV5\">Import & Export</a>, but only for the HTML format. Markdown exports will not preserve the collapse state.</li><li>Collapsible bullets only exist in the context of editable text notes. Read-only lists will always be fully expanded.</li><li>The list items will auto-expand on edit to avoid typing in a hidden area.</li></ul>",diff --git a/docs/User Guide/User Guide/Note Types/Text/Links/External links.md b/docs/User Guide/User Guide/Note Types/Text/Links/External links.mdindex c1617cf2b6..6875cd122d 100644--- a/docs/User Guide/User Guide/Note Types/Text/Links/External links.md+++ b/docs/User Guide/User Guide/Note Types/Text/Links/External links.md@@ -8,6 +8,7 @@ To create a link without a custom text:* Press <kbd>Enter</kbd> or the check mark icon to confirm.* Alternatively, press <kbd>Ctrl</kbd>+<kbd>K</kbd> to trigger the aforementioned popup.* A simpler way is to paste the raw link and press space to turn it automatically into a link.+* Since v0.107.0, the _Add link_ dialog of <a class="reference-link" href="Internal%20(reference)%20links.md">Internal (reference) links</a> (<kbd>Ctrl</kbd>+<kbd>L</kbd> or the <span class="tn-icon cke cke-trilium"></span> button) creates external links as well. Select _Web link_ at the top of the dialog, type or paste the address, and optionally a _Link title_; without one, the link shows its address. An address without a scheme, such as `example.com`, gets `https://`. A URL pasted into the _Note_ field, or picked from its search, switches the dialog to _Web link_. The dialog also opens on _Web link_ when the selected text is a URL.To create a link with a custom text: