Skip to content

Build your personal knowledge base with Trilium Notes

docs(user): update Link Preview

Elian Doran1e76645179d5
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/AI.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/AI.html
index 76c8c0897e..30ab26af3b 100644
--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/AI.html
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/AI.html
@@ -61,7 +61,7 @@
<aside class="admonition important">
<p>Subscription-based providers are still in beta. They are safe to use (they
won't use additional funds and respect the terms of use), but you might
- experience small issues. Consider&nbsp;<a class="reference-link" href="#root/pOsGYCXsbNQG/BgmBlOIl72jZ/_help_wy8So3yZZlH9">Reporting issues</a>.</p>
+ experience small issues. Consider&nbsp;<a class="reference-link" href="#root/_help_wy8So3yZZlH9">Reporting issues</a>.</p>
</aside>
<p>Some cloud providers offer a subscription, which has a fixed monthly fee
instead of pay-per-use (unlike the API keys). Trilium v0.104.0 introduces
@@ -70,10 +70,10 @@
<p>To use a subscription:</p>
<ol>
<li>First, Claude Code needs to be installed on the machine that runs Trilium.
- So for a&nbsp;<a class="reference-link" href="#root/pOsGYCXsbNQG/Otzi9La2YAUX/_help_poXkQfguuA0U">Desktop Installation</a>,
+ So for a&nbsp;<a class="reference-link" href="#root/_help_poXkQfguuA0U">Desktop Installation</a>,
Claude needs to be installed locally and for a&nbsp;<a class="reference-link"
- href="#root/pOsGYCXsbNQG/Otzi9La2YAUX/_help_WOcw2SLH6tbX">Server Installation</a>&nbsp;accessed
- via a browser, Claude needs to be installed on the server.</li>
+ href="#root/_help_WOcw2SLH6tbX">Server Installation</a>&nbsp;accessed via a browser,
+ Claude needs to be installed on the server.</li>
<li>Claude Code must already be authenticated. To do so, run <code spellcheck="false">claude</code> in
a terminal once, type <code spellcheck="false">login</code> and follow the
instructions.</li>
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Configuration (config.ini or environment variables)/Cross-Origin Resource Sharing (CORS).html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Configuration (config.ini or environment variables)/Cross-Origin Resource Sharing (CORS).html
index 9b6eb43ce1..34c6eac295 100644
--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Configuration (config.ini or environment variables)/Cross-Origin Resource Sharing (CORS).html
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Configuration (config.ini or environment variables)/Cross-Origin Resource Sharing (CORS).html
@@ -3,13 +3,8 @@
<p>However, it is possible to manually configure <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS">Cross-Origin Resource Sharing (CORS)</a> since
Trilium v0.93.0 using environment variables or <code spellcheck="false">config.ini</code>,
as follows:</p>
-<figure class="table" style="width:100%;">
- <table class="ck-table-resized">
- <colgroup>
- <col style="width:25.45%;">
- <col style="width:31.27%;">
- <col style="width:43.28%;">
- </colgroup>
+<figure class="table">
+ <table>
<thead>
<tr>
<th>CORS Header</th>
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Import & Export/Markdown.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Import & Export/Markdown.html
index 8a9149642f..5d8d02dead 100644
--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Import & Export/Markdown.html
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Import & Export/Markdown.html
@@ -20,7 +20,6 @@
</ul>
</li>
</ul>
-<p>[[gifs/markdown-file-import.gif]]</p>
<p>
<img src="Markdown_markdown-file-import.gif">
</p>
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Markdown.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Markdown.html
index 2ba527dfdd..a4bbb8a4c6 100644
--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Markdown.html
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Markdown.html
@@ -32,16 +32,11 @@
<p>The following features are supported by Trilium's Markdown format and
will show up in the preview pane:</p>
<ul>
- <li>
- <p>All standard and GitHub-flavored syntax (basic formatting, tables, blockquotes).</p>
- </li>
- <li>
- <p>Basic HTML is also supported (e.g. collapsible blocks using <code spellcheck="false">&lt;details&gt;</code> and
- <code
- spellcheck="false">&lt;summary&gt;</code>).</p>
- </li>
- <li>
- <p>Code blocks with syntax highlight.</p>
+ <li>All standard and GitHub-flavored syntax (basic formatting, tables, blockquotes).</li>
+ <li>Basic HTML is also supported (e.g. collapsible blocks using <code spellcheck="false">&lt;details&gt;</code> and
+ <code
+ spellcheck="false">&lt;summary&gt;</code>).</li>
+ <li>Code blocks with syntax highlight.
<ul>
<li>The language must be specified for syntax highlight to be applied (e.g.
<code
@@ -51,19 +46,13 @@
href="#root/_help_4TIF1oA4VQRO">Options</a>.</li>
</ul>
</li>
- <li>
- <p><a class="reference-link" href="#root/_help_NwBbFdNZ9h7O">Block quotes &amp; admonitions</a>
- </p>
- </li>
- <li>
- <p><a class="reference-link" href="#root/_help_YfYAtQBcfo5V">Math Equations</a>&nbsp;(both
- inline and block)</p>
+ <li><a class="reference-link" href="#root/_help_NwBbFdNZ9h7O">Block quotes &amp; admonitions</a>
</li>
- <li>
- <p><a class="reference-link" href="#root/_help_s1aBHPd79XYj">Mermaid Diagrams</a>&nbsp;using
- <code
- spellcheck="false">```mermaid</code>
- </p>
+ <li><a class="reference-link" href="#root/_help_YfYAtQBcfo5V">Math Equations</a>&nbsp;(both
+ inline and block)</li>
+ <li><a class="reference-link" href="#root/_help_s1aBHPd79XYj">Mermaid Diagrams</a>&nbsp;using
+ <code
+ spellcheck="false">```mermaid</code>
</li>
<li>
<p><a class="reference-link" href="#root/_help_nBAXQFj20hS1">Include Note</a>&nbsp;(no
@@ -116,6 +105,10 @@
<li>Use the <em>Add link</em> dialog by pressing <kbd>Ctrl</kbd>+<kbd>L</kbd> or
typing the <code spellcheck="false">/link</code> command.</li>
</ul>
+<p><a class="reference-link" href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/iPIMuisry3hd/_help_UmgZAfcltxkS">Link Previews</a>&nbsp;are
+ also rendered, but there is no mechanism to insert them automatically as
+ of now, they have to be copied from a&nbsp;<a class="reference-link" href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/_help_iPIMuisry3hd">Text</a>&nbsp;note
+ instead.</p>
<h3>Keyboard shortcuts</h3>
<p>The Markdown notes share some of the keyboard shortcuts from&nbsp;<a class="reference-link"
href="#root/_help_iPIMuisry3hd">Text</a>&nbsp;notes:</p>
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Text/Link Previews.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Text/Link Previews.html
index 8f49e8f70e..40ee2db3dc 100644
--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Text/Link Previews.html
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Text/Link Previews.html
@@ -3,76 +3,128 @@
<h2>Display modes</h2>
<p>A link preview can be displayed in one of three modes:</p>
<ul>
- <li>
- <p>
- <img class="image_resized" style="aspect-ratio:251/42;width:25%;" src="Link Previews_image.png"
- width="251" height="42"><strong>Inline</strong> — a pill showing the site's favicon and page title.
- Use this when you want the link to flow with the surrounding paragraph.</p>
- </li>
- <li>
- <img class="image_resized" style="aspect-ratio:1217/196;width:61.28%;"
- src="2_Link Previews_image.png" width="1217"
- height="196">
- <p><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.</p>
- </li>
- <li>
- <img class="image_resized" style="aspect-ratio:994/563;width:49.28%;"
- src="1_Link Previews_image.png" width="994"
- height="563">
- <p><strong>Embed</strong> — a block-level interactive embed. Currently supported
- for YouTube videos, which render as a playable iframe. For URLs that don't
- support an embedded view, this mode falls back to the Card layout.</p>
+ <li><strong>Inline</strong> — a link showing the site's favicon and page title
+ (quite similar to&nbsp;<a class="reference-link" href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/iPIMuisry3hd/QEAPj01N5f7w/_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 spellcheck="false">iframe</code>).</li>
+ <li>To prevent unwanted remote requests, the video is shown only after clicking
+ on it first.</li>
+ </ul>
</li>
</ul>
+<figure class="table" style="width:100%;">
+ <table class="ck-table-resized">
+ <colgroup>
+ <col style="width:21.85%;">
+ <col style="width:38.84%;">
+ <col style="width:39.31%;">
+ </colgroup>
+ <tbody>
+ <tr>
+ <td>
+ <figure class="image image_resized" style="width:100%;">
+ <img style="aspect-ratio:251/42;" src="Link Previews_image.png"
+ width="251" height="42">
+ <figcaption><em>Inline</em> link preview</figcaption>
+ </figure>
+ </td>
+ <td>
+ <figure class="image image_resized" style="width:100%;">
+ <img style="aspect-ratio:1217/196;" src="2_Link Previews_image.png"
+ width="1217" height="196">
+ <figcaption><em>Card</em> link preview</figcaption>
+ </figure>
+ </td>
+ <td>
+ <figure class="image image_resized" style="width:100%;">
+ <img style="aspect-ratio:994/563;" src="1_Link Previews_image.png"
+ width="994" height="563">
+ <figcaption><em>Embed</em> link preview</figcaption>
+ </figure>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+</figure>
<h2>Inserting a link preview</h2>
<p>There are two ways to create one:</p>
-<h3>1. Paste a URL</h3>
-<p>Paste a raw URL and press <kbd>Space</kbd>. Trilium will fetch the page's
- metadata in the background and convert the link into a <strong>Mention</strong>.
- Press <kbd>Ctrl</kbd>+<kbd>Z</kbd> immediately afterwards to keep it as a
- plain link instead.</p>
-<aside class="admonition note">
+<h3>1. By pasting a URL</h3>
+<p>A link preview is automatically created:</p>
+<ul>
+ <li>By pasting the URL and pressing <kbd spellcheck="false">Space</kbd>. This
+ will create an <em>inline</em> link preview.</li>
+ <li>When at the start of a new paragraph, pressing <kbd spellcheck="false">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 spellcheck="false">Ctrl</kbd>+
+ <kbd
+ spellcheck="false">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&nbsp;<a class="reference-link"
+ href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/Vc8PjrjAGuOp/_help_4TIF1oA4VQRO">Options</a>&nbsp;→ <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. Use the "Link preview" toolbar button</h3>
-<p>Click <strong>Link preview</strong> in the formatting toolbar to open the <em>Insert link preview</em> dialog.
- Enter the URL and choose <strong>@ Mention</strong>, <strong>URL</strong> (plain
- link, no preview), or <strong>Embed</strong>.</p>
-<h2>Switching modes on an existing link preview</h2>
-<p>Click on an inserted link preview to select it. A small toolbar will offer
- the three modes — Inline, Card, and Embed. The Embed option is only enabled
- when the URL points to a supported service (YouTube today).</p>
-<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 spellcheck="false">og:title</code>, <code spellcheck="false">og:description</code>,
- <code
- spellcheck="false">og:image</code>, <code spellcheck="false">og:site_name</code>), falling
- back to the page's <code spellcheck="false">&lt;title&gt;</code> and
+ </aside>
+ <h3>2. By using the "Link preview" toolbar button</h3>
+ <p>Click <strong>Link preview</strong> in the formatting toolbar to open the <em>Link preview</em> popup.
+ Paste the URL and choose the type of preview.</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 spellcheck="false">og:title</code>, <code spellcheck="false">og:description</code>,
<code
- spellcheck="false">&lt;meta name="description"&gt;</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.</p>
-<h2>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>The preview reflects the page at the moment you inserted the link.</li>
- <li>Pages that block automated fetches or that don't expose OpenGraph metadata
- 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>
\ No newline at end of file
+ spellcheck="false">og:image</code>, <code spellcheck="false">og:site_name</code>), falling
+ back to the page's <code spellcheck="false">&lt;title&gt;</code> and
+ <code
+ spellcheck="false">&lt;meta name="description"&gt;</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&nbsp;<a class="reference-link" href="#root/pOsGYCXsbNQG/Otzi9La2YAUX/_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 or that don't expose OpenGraph metadata
+ 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>
\ No newline at end of file
diff --git a/docs/User Guide/!!!meta.json b/docs/User Guide/!!!meta.json
index 8d5cf9d175..9b222e6884 100644
--- a/docs/User Guide/!!!meta.json
+++ b/docs/User Guide/!!!meta.json
@@ -10232,6 +10232,27 @@
"value": "link-previews",
"isInheritable": false,
"position": 40
+ },
+ {
+ "type": "relation",
+ "name": "internalLink",
+ "value": "hrZ1D00cLbal",
+ "isInheritable": false,
+ "position": 50
+ },
+ {
+ "type": "relation",
+ "name": "internalLink",
+ "value": "4TIF1oA4VQRO",
+ "isInheritable": false,
+ "position": 60
+ },
+ {
+ "type": "relation",
+ "name": "internalLink",
+ "value": "WOcw2SLH6tbX",
+ "isInheritable": false,
+ "position": 70
}
],
"format": "markdown",
@@ -12920,6 +12941,13 @@
"value": "markdown",
"isInheritable": false,
"position": 40
+ },
+ {
+ "type": "relation",
+ "name": "internalLink",
+ "value": "UmgZAfcltxkS",
+ "isInheritable": false,
+ "position": 210
}
],
"format": "markdown",
@@ -18569,87 +18597,101 @@
{
"type": "relation",
"name": "internalLink",
- "value": "4TIF1oA4VQRO",
+ "value": "poXkQfguuA0U",
"isInheritable": false,
"position": 60
},
{
"type": "relation",
"name": "internalLink",
- "value": "RnaPdbciOfeq",
+ "value": "WOcw2SLH6tbX",
"isInheritable": false,
"position": 70
},
{
"type": "relation",
"name": "internalLink",
- "value": "l0tKav7yLHGF",
+ "value": "4TIF1oA4VQRO",
"isInheritable": false,
"position": 80
},
{
"type": "relation",
"name": "internalLink",
- "value": "2mUhVmZK8RF3",
+ "value": "RnaPdbciOfeq",
"isInheritable": false,
"position": 90
},
{
"type": "relation",
"name": "internalLink",
- "value": "KC1HB96bqqHX",
+ "value": "l0tKav7yLHGF",
"isInheritable": false,
"position": 100
},
{
"type": "relation",
"name": "internalLink",
- "value": "vZWERwf8U3nx",
+ "value": "2mUhVmZK8RF3",
"isInheritable": false,
"position": 110
},
{
"type": "relation",
"name": "internalLink",
- "value": "0vhv7lsOLy82",
+ "value": "KC1HB96bqqHX",
"isInheritable": false,
"position": 120
},
{
"type": "relation",
"name": "internalLink",
- "value": "TiQbQDgP8L5t",
+ "value": "vZWERwf8U3nx",
"isInheritable": false,
"position": 130
},
{
"type": "relation",
"name": "internalLink",
- "value": "hrZ1D00cLbal",
+ "value": "0vhv7lsOLy82",
"isInheritable": false,
"position": 140
},
{
"type": "relation",
"name": "internalLink",
- "value": "eIg8jdvaoNNd",
+ "value": "TiQbQDgP8L5t",
"isInheritable": false,
"position": 150
},
{
"type": "relation",
"name": "internalLink",
- "value": "SPirpZypehBG",
+ "value": "hrZ1D00cLbal",
"isInheritable": false,
"position": 160
},
{
"type": "relation",
"name": "internalLink",
- "value": "yIhgI5H7A2Sm",
+ "value": "eIg8jdvaoNNd",
"isInheritable": false,
"position": 170
},
+ {
+ "type": "relation",
+ "name": "internalLink",
+ "value": "SPirpZypehBG",
+ "isInheritable": false,
+ "position": 180
+ },
+ {
+ "type": "relation",
+ "name": "internalLink",
+ "value": "yIhgI5H7A2Sm",
+ "isInheritable": false,
+ "position": 190
+ },
{
"type": "label",
"name": "shareAlias",
@@ -18663,20 +18705,6 @@
"value": "bx bx-bot",
"isInheritable": false,
"position": 30
- },
- {
- "type": "relation",
- "name": "internalLink",
- "value": "poXkQfguuA0U",
- "isInheritable": false,
- "position": 180
- },
- {
- "type": "relation",
- "name": "internalLink",
- "value": "WOcw2SLH6tbX",
- "isInheritable": false,
- "position": 190
}
],
"format": "markdown",
diff --git a/docs/User Guide/User Guide/Basic Concepts and Features/Import & Export/Markdown.md b/docs/User Guide/User Guide/Basic Concepts and Features/Import & Export/Markdown.md
index f03a0d0065..7d8bfe0a24 100644
--- a/docs/User Guide/User Guide/Basic Concepts and Features/Import & Export/Markdown.md
+++ b/docs/User Guide/User Guide/Basic Concepts and Features/Import & Export/Markdown.md
@@ -18,8 +18,6 @@ You can also import Markdown files from files:
* Markdown files need to be packaged into ZIP archive because browser can't read directories, only single files.
* You can use e.g. [7-zip](https://www.7-zip.org) to package directory of markdown files into the ZIP file
-\[\[gifs/markdown-file-import.gif\]\]
-
![](Markdown_markdown-file-import.gif)
## Export
diff --git a/docs/User Guide/User Guide/Note Types/Markdown.md b/docs/User Guide/User Guide/Note Types/Markdown.md
index acd80938ff..edd1b1c9ee 100644
--- a/docs/User Guide/User Guide/Note Types/Markdown.md
+++ b/docs/User Guide/User Guide/Note Types/Markdown.md
@@ -27,7 +27,6 @@ The following features are supported by Trilium's Markdown format and will show
* All standard and GitHub-flavored syntax (basic formatting, tables, blockquotes).
* Basic HTML is also supported (e.g. collapsible blocks using `<details>` and `<summary>`).
* Code blocks with syntax highlight.
-
* The language must be specified for syntax highlight to be applied (e.g. ` ```js `).
* Code blocks will respect the text wrapping from the <a class="reference-link" href="Text.md">Text</a> section in <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Options.md">Options</a>.
* <a class="reference-link" href="Text/Block%20quotes%20%26%20admonitions.md">Block quotes &amp; admonitions</a>
@@ -88,6 +87,8 @@ To create a link, either:
* Type it manually using the syntax described above.
* Use the _Add link_ dialog by pressing <kbd>Ctrl</kbd>+<kbd>L</kbd> or typing the `/link` command.
+<a class="reference-link" href="Text/Link%20Previews.md">Link Previews</a> are also rendered, but there is no mechanism to insert them automatically as of now, they have to be copied from a <a class="reference-link" href="Text.md">Text</a> note instead.
+
### Keyboard shortcuts
The Markdown notes share some of the keyboard shortcuts from <a class="reference-link" href="Text.md">Text</a> notes:
diff --git a/docs/User Guide/User Guide/Note Types/Text/Link Previews.md b/docs/User Guide/User Guide/Note Types/Text/Link Previews.md
index 6b48066178..38307abf02 100644
--- a/docs/User Guide/User Guide/Note Types/Text/Link Previews.md
+++ b/docs/User Guide/User Guide/Note Types/Text/Link Previews.md
@@ -5,32 +5,59 @@ Link previews turn a pasted URL into a rich, metadata-aware widget that can be d
A link preview can be displayed in one of three modes:
-* <img class="image_resized" style="aspect-ratio:251/42;width:25%;" src="Link Previews_image.png" width="251" height="42">**Inline** — a pill showing the site's favicon and page title. Use this when you want the link to flow with the surrounding paragraph.
-* <img class="image_resized" style="aspect-ratio:1217/196;width:61.28%;" src="2_Link Previews_image.png" width="1217" height="196">
-
- **Card** — a block-level preview with thumbnail, title, description, and site name. Use this when the link is the focus of a paragraph.
-* <img class="image_resized" style="aspect-ratio:994/563;width:49.28%;" src="1_Link Previews_image.png" width="994" height="563">
-
- **Embed** — a block-level interactive embed. Currently supported for YouTube videos, which render as a playable iframe. For URLs that don't support an embedded view, this mode falls back to the Card layout.
+* **Inline** — a link showing the site's favicon and page title (quite similar to <a class="reference-link" href="Links/Internal%20(reference)%20links.md">Internal (reference) links</a>). Use this when you want the link to flow with the surrounding paragraph.
+* **Card** — a block-level preview with thumbnail, title, description, and site name. Use this when the link is the focus of a paragraph.
+* **Embed** — a block-level interactive embed.
+ * Currently supported for YouTube videos, which render interactively (via an `iframe`).
+ * To prevent unwanted remote requests, the video is shown only after clicking on it first.
+
+<table class="ck-table-resized">
+ <colgroup>
+ <col style="width:21.85%;">
+ <col style="width:38.84%;">
+ <col style="width:39.31%;">
+ </colgroup>
+ <tbody>
+ <tr>
+ <td><figure class="image image_resized" style="width:100%;"><img style="aspect-ratio:251/42;" src="Link Previews_image.png" width="251" height="42"><figcaption><em>Inline</em> link preview</figcaption></figure></td>
+ <td><figure class="image image_resized" style="width:100%;"><img style="aspect-ratio:1217/196;" src="2_Link Previews_image.png" width="1217" height="196"><figcaption><em>Card</em> link preview</figcaption></figure></td>
+ <td><figure class="image image_resized" style="width:100%;"><img style="aspect-ratio:994/563;" src="1_Link Previews_image.png" width="994" height="563"><figcaption><em>Embed</em> link preview</figcaption></figure></td>
+ </tr>
+ </tbody>
+</table>
## Inserting a link preview
There are two ways to create one:
-### 1\. Paste a URL
+### 1\. By pasting a URL
-Paste a raw URL and press <kbd>Space</kbd>. Trilium will fetch the page's metadata in the background and convert the link into a **Mention**. Press <kbd>Ctrl</kbd>+<kbd>Z</kbd> immediately afterwards to keep it as a plain link instead.
+A link preview is automatically created:
+
+* By pasting the URL and pressing <kbd spellcheck="false">Space</kbd>. This will create an _inline_ link preview.
+* When at the start of a new paragraph, pressing <kbd spellcheck="false">Enter</kbd> will create a _card_ or an _embed_ for YouTube URLs.
+
+To undo an automatic link preview, press <kbd spellcheck="false">Ctrl</kbd>+<kbd spellcheck="false">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 _Plain link_ from the link preview toolbar.
+
+This automatic conversion can be disabled by going to <a class="reference-link" href="../../Basic%20Concepts%20and%20Features/UI%20Elements/Options.md">Options</a> → _Text Notes_ and unchecking _Autogenerate link previews_ from the _Features_ section.
+
+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.
> [!NOTE]
> A URL is only auto-converted when the pasted text _is_ the URL. Links with a display name (e.g. [Trilium Notes website](https://triliumnotes.org)) are left as plain links.
-### 2\. Use the "Link preview" toolbar button
+### 2\. By using the "Link preview" toolbar button
+
+Click **Link preview** in the formatting toolbar to open the _Link preview_ popup. Paste the URL and choose the type of preview.
-Click **Link preview** in the formatting toolbar to open the _Insert link preview_ dialog. Enter the URL and choose **@ Mention**, **URL** (plain link, no preview), or **Embed**.
+## Altering an existing link preview
-## Switching modes on an existing link preview
+Click on an inserted link preview to select it, and a small toolbar will appear with the following options:
-Click on an inserted link preview to select it. A small toolbar will offer the three modes — Inline, Card, and Embed. The Embed option is only enabled when the URL points to a supported service (YouTube today).
+* The normal link operations (opening in a new tab, copying the link, unlinking).
+* A button to edit the title of the link preview. This is especially useful if the title is hidden behind a login screen.
+* A way to switch between the link preview modes (Inline, Card or Embed) as well as to convert it to a normal link instead.
+ * The Embed option is only enabled when the URL points to a supported service (YouTube today).
## Where the preview data comes from
@@ -41,11 +68,12 @@ When you insert a link preview, Trilium fetches metadata once and stores it insi
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.
-The metadata is captured **at insertion time** 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.
+The metadata is captured **at insertion time** 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.
+
+When accessing a <a class="reference-link" href="../../Installation%20%26%20Setup/Server%20Installation.md">Server Installation</a>, the data is fetched from the remote URL by the server and not the client.
-## Limitations
+## Known limitations
* The Embed display mode currently only supports YouTube. Other video and media platforms fall back to a Card preview.
-* The preview reflects the page at the moment you inserted the link.
* Pages that block automated fetches or that don't expose OpenGraph metadata may produce a minimal preview (hostname only).
* 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.
\ No newline at end of file