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
docs(user): mention change in language
Elian Dorane16b8b0aa164
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Bulk Actions.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Bulk Actions.htmlindex b5a3548555..e6d0ca6bed 100644--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Bulk Actions.html+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Bulk Actions.html@@ -157,12 +157,12 @@<ul><li><p>To apply a suffix (<code spellcheck="false">- suffix</code> in this example),- to the note title:</p><pre><code class="language-application-javascript-env-backend">note.title = note.title + " - suffix";</code></pre>+ to the note title:</p><pre><code class="language-text-javascript">note.title = note.title + " - suffix";</code></pre></li><li><p>To alter attributes of a note based on another attribute, such as settingthe <code spellcheck="false">#shareAlias</code> label to the title of the- note:</p><pre><code class="language-application-javascript-env-backend">note.setLabel("shareAlias", note.title)</code></pre>+ note:</p><pre><code class="language-text-javascript">note.setLabel("shareAlias", note.title)</code></pre></li></ul></li>diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Database/Manually altering the database/SQL Console.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Database/Manually altering the database/SQL Console.htmlindex 0ff2e59b33..532839d566 100644--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Database/Manually altering the database/SQL Console.html+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Database/Manually altering the database/SQL Console.html@@ -1,6 +1,6 @@<aside class="admonition important"><p>Starting with v0.104.0, backend scripts are disabled by default to reduce- the attack surface. See <a class="reference-link" href="#root/pOsGYCXsbNQG/CdNpE2pqjmI6/_help_fiHicjpHjIRJ">Security</a> for+ the attack surface. See <a class="reference-link" href="#root/_help_fiHicjpHjIRJ">Security</a> formore information.</p></aside><p>The SQL Console is Trilium's built-in database editor.</p>@@ -16,8 +16,7 @@<li>Only one SQL statement can be run at once.</li><li>To run the statement, press the <em>Execute</em> icon.</li><li>For queries that return a result, the data will displayed in a table.</li>- <li- >For statements (e.g. <code spellcheck="false">INSERT</code>, <code spellcheck="false">UPDATE</code>),+ <li>For statements (e.g. <code spellcheck="false">INSERT</code>, <code spellcheck="false">UPDATE</code>),the number of affected rows is displayed.</li></ul><figure class="image">@@ -31,11 +30,10 @@<li>Underneath each column there is an input field which allows filteringby text.</li><li>Press <kbd>Ctrl</kbd>+<kbd>C</kbd> to copy the current cell to clipboard.</li>- <li- >Multiple cells can be selected by dragging or by holding <kbd>Shift</kbd> ++ <li>Multiple cells can be selected by dragging or by holding <kbd>Shift</kbd> +arrow keys</li>- <li>Results are paginated for performance reasons. The controls at the bottom- of the table can be used to navigate through pages.</li>+ <li>Results are paginated for performance reasons. The controls at the bottom+ of the table can be used to navigate through pages.</li></ul><h3>Saved SQL console</h3><p>SQL queries or commands can be saved into a dedicated note.</p>diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing.htmlindex ceb96676ba..7aba528f2b 100644--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing.html+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing.html@@ -280,7 +280,7 @@ class="image"></ul><p>If no location is specified, the HTML will be injected at <code spellcheck="false">content:end</code> bydefault.</p>- <p>Example:</p><pre><code class="language-application-javascript-env-backend">const currentNote = await fetchNote();+ <p>Example:</p><pre><code class="language-text-javascript">const currentNote = await fetchNote();const parentNote = await fetchNote(currentNote.parentNoteIds[0]);for (const attr of parentNote.attributes) {diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Render Note.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Render Note.htmlindex efff5c09b9..4ff68a9c76 100644--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Render Note.html+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Render Note.html@@ -31,7 +31,7 @@ The current date & time is <span class="date"></span></code></pr<p>Now we need to add the script. Create another <a class="reference-link"href="#root/_help_6f9hih2hXXZk">Code</a>, but this time of JavaScript (frontend)language. Make sure the newly created note is a direct child of the HTML- note created previously; with the following content:</p><pre><code class="language-application-javascript-env-backend">const $dateEl = api.$container.find(".date");+ note created previously; with the following content:</p><pre><code class="language-text-javascript">const $dateEl = api.$container.find(".date");$dateEl.text(new Date());</code></pre><p>Now create a render note at any place and set its <code spellcheck="false">~renderNote</code> relationto point to the HTML note. When the render note is accessed it will display:</p>diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Backend scripts.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Backend scripts.htmlindex 771f351d19..c6277f64de 100644--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Backend scripts.html+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Backend scripts.html@@ -8,7 +8,7 @@run on the PC).</p><aside class="admonition important"><p>Starting with v0.104.0, backend scripts are disabled by default to reduce- the attack surface. See <a class="reference-link" href="#root/pOsGYCXsbNQG/CdNpE2pqjmI6/_help_fiHicjpHjIRJ">Security</a> for+ the attack surface. See <a class="reference-link" href="#root/_help_fiHicjpHjIRJ">Security</a> formore information.</p></aside><h2>Advantages of backend scripts</h2>@@ -20,7 +20,7 @@in memory. Whereas on the client, notes have to be manually loaded first.</p><h2>Creating a backend script</h2><p>Create a new <a class="reference-link" href="#root/_help_6f9hih2hXXZk">Code</a> note- and select the language <em>JS backend</em>.</p>+ and select the language <em>JavaScript (Trilium backend)</em>.</p><h2>Running backend scripts</h2><p>Backend scripts can be either run manually (via the Execute button onthe script page), or they can be triggered on certain events.</p>diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Backend scripts/Events.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Backend scripts/Events.htmlindex f9d6378383..e7b46fa80a 100644--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Backend scripts/Events.html+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Backend scripts/Events.html@@ -1,6 +1,6 @@<p><a href="#root/_help_CdNpE2pqjmI6">Script</a> notes can be triggered by events.Note that these are backend events and thus relation need to point to the- "JS backend" code note.</p>+ "JavaScript (Trilium backend)" code note.</p><h2>Global events</h2><p>Global events are attached to the script note via label. Simply createe.g. "run" label with some of these values and script note will be executed@@ -143,7 +143,7 @@<p>For example, here's a script with <code spellcheck="false">~runOnAttributeChange</code> whichautomatically changes the color of a note based on the value of the<code- spellcheck="false">mycategory</code>label:</p><pre><code class="language-application-javascript-env-backend">const attr = api.originEntity;+ spellcheck="false">mycategory</code>label:</p><pre><code class="language-text-javascript">const attr = api.originEntity;if (attr.name !== "mycategory") return;const note = api.getNote(attr.noteId);if (attr.value === "Health") {diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Breaking changes/v0.103.0 Removal of axios.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Breaking changes/v0.103.0 Removal of axios.htmlindex 12379b5c61..c9d33b0548 100644--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Breaking changes/v0.103.0 Removal of axios.html+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Breaking changes/v0.103.0 Removal of axios.html@@ -15,13 +15,13 @@<codespellcheck="false">fetch()</code>API.</p><h3><code spellcheck="false">GET</code> calls</h3>-<p>Before (Axios):</p><pre><code class="language-application-javascript-env-backend">const response = await api.axios.get('https://api.example.com/data');+<p>Before (Axios):</p><pre><code class="language-text-javascript">const response = await api.axios.get('https://api.example.com/data');const data = response.data;</code></pre>-<p>After (<code spellcheck="false">fetch</code>):</p><pre><code class="language-application-javascript-env-backend">const response = await fetch('https://api.example.com/data');+<p>After (<code spellcheck="false">fetch</code>):</p><pre><code class="language-text-javascript">const response = await fetch('https://api.example.com/data');const data = await response.json();</code></pre><h3><code spellcheck="false">POST</code> calls</h3>-<p>Before (Axios):</p><pre><code class="language-application-javascript-env-backend">await api.axios.post('https://api.example.com/data', { key: 'value' });</code></pre>-<p>After (fetch):</p><pre><code class="language-application-javascript-env-backend">await fetch('https://api.example.com/data', {+<p>Before (Axios):</p><pre><code class="language-text-javascript">await api.axios.post('https://api.example.com/data', { key: 'value' });</code></pre>+<p>After (fetch):</p><pre><code class="language-text-javascript">await fetch('https://api.example.com/data', {method: 'POST',headers: { 'Content-Type': 'application/json' },body: JSON.stringify({ key: 'value' })diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Breaking changes/v0.103.0 `cheerio` is now depr.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Breaking changes/v0.103.0 `cheerio` is now depr.htmlindex 78add86daf..2eb60ac545 100644--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Breaking changes/v0.103.0 `cheerio` is now depr.html+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Breaking changes/v0.103.0 `cheerio` is now depr.html@@ -6,9 +6,9 @@<codespellcheck="false">cheerio</code>reduces bundle size and maintenance overhead.</p><h2>Migration</h2>-<p>Before (<code spellcheck="false">cheerio</code>):</p><pre><code class="language-application-javascript-env-backend">const $ = api.cheerio.load(html);+<p>Before (<code spellcheck="false">cheerio</code>):</p><pre><code class="language-text-javascript">const $ = api.cheerio.load(html);const title = $('h1').text();const links = $('a').map((i, el) => $(el).attr('href')).get();</code></pre>-<p>After (<code spellcheck="false">htmlParser</code>):</p><pre><code class="language-application-javascript-env-backend">const root = api.htmlParser.parse(html);+<p>After (<code spellcheck="false">htmlParser</code>):</p><pre><code class="language-text-javascript">const root = api.htmlParser.parse(html);const title = root.querySelector('h1')?.textContent;const links = root.querySelectorAll('a').map(a => a.getAttribute('href'));</code></pre>\ No newline at end of filediff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Breaking changes/v0.104.0 Disabling the Node in.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Breaking changes/v0.104.0 Disabling the Node in.htmlindex c0e71d05b6..27efbfc4ac 100644--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Breaking changes/v0.104.0 Disabling the Node in.html+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Breaking changes/v0.104.0 Disabling the Node in.html@@ -20,12 +20,12 @@ class="admonition note"><h2>Overview of the API</h2><p>The Frontend and Backend APIs reside in a global variable, <code spellcheck="false">api</code>,that can be used anywhere in the script. For example, to display a message- to the user the following front-end script can be used:</p><pre><code class="language-application-javascript-env-backend">api.showMessage("Hello world.");</code></pre>+ to the user the following front-end script can be used:</p><pre><code class="language-text-javascript">api.showMessage("Hello world.");</code></pre><p>The Electron API is different: it lives on <code spellcheck="false">window.electronApi</code> (exposedby the desktop preload script), not on <code spellcheck="false">api</code>,and is only available in the Electron desktop build. Frontend scripts thatuse it should guard with <code spellcheck="false">if (window.electronApi)</code> so- they degrade cleanly in the browser and standalone (WASM) builds.</p><pre><code class="language-application-javascript-env-backend">window.electronApi?.window.setZoomFactor(1.2);</code></pre>+ they degrade cleanly in the browser and standalone (WASM) builds.</p><pre><code class="language-text-javascript">window.electronApi?.window.setZoomFactor(1.2);</code></pre><h2>Additional protection</h2><p>Some of the APIs have additional safe-guards built in which prevent unauthorizedaccess.</p>diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Common concepts/Script bundles.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Common concepts/Script bundles.htmlindex 2970c5167e..49121b2548 100644--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Common concepts/Script bundles.html+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Common concepts/Script bundles.html@@ -12,11 +12,11 @@<ul><li><p><em>Script with dependency</em>- </p><pre><code class="language-application-javascript-env-backend">api.log(MyMath.sum(2, 2));</code></pre>+ </p><pre><code class="language-text-javascript">api.log(MyMath.sum(2, 2));</code></pre><ul><li><p><em>MyMath</em>- </p><pre><code class="language-application-javascript-env-backend">module.exports = {+ </p><pre><code class="language-text-javascript">module.exports = {sum(a, b) {return a + b;}@@ -34,7 +34,7 @@</aside><h2>Alternative syntax</h2><p>Instead of providing an object to <code spellcheck="false">module.exports</code>,- it's also possible to add fields individually:</p><pre><code class="language-application-javascript-env-backend">module.exports.sum = (a, b) => a + b;+ it's also possible to add fields individually:</p><pre><code class="language-text-javascript">module.exports.sum = (a, b) => a + b;module.exports.subtract = (a, b) => a - b;</code></pre><h2>Ignoring a code script from a bundle</h2><p>To ignore a script from being included in a bundle (e.g. if it's unrelateddiff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Word count widget.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Word count widget.htmlindex 8a2f22b78a..790cd33dd1 100644--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Word count widget.html+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Word count widget.html@@ -3,7 +3,9 @@href="#root/_help_6tZeKvSHEUiB">Demo Notes</a>.</p></aside><p>Create a <a class="reference-link" href="#root/_help_6f9hih2hXXZk">Code</a> note- of type JS frontend and <strong>give it a</strong> <code spellcheck="false">#widget</code> <strong>label</strong>.</p><pre><code class="language-text-x-trilium-auto">/*+ of type JavaScript (Trilium frontend) and <strong>give it a</strong>+ <code+ spellcheck="false">#widget</code> <strong>label</strong>.</p><pre><code class="language-text-x-trilium-auto">/** This defines a custom widget which displays number of words and characters in a current text note.* To be activated for a given note, add label 'wordCount' to the note, you can also make it inheritable and thus activate it for the whole subtree.*diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Examples/New Task launcher button.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Examples/New Task launcher button.htmlindex 346b57093b..67d8a86db2 100644--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Examples/New Task launcher button.html+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Examples/New Task launcher button.html@@ -6,13 +6,13 @@<h2>Creating the note</h2><ol><li>First, create a new <a class="reference-link" href="#root/_help_6f9hih2hXXZk">Code</a> note- type with the <em>JS frontend</em> language.</li>+ type with the <em>JavaScript (Trilium frontend)</em> language.</li><li>Define the <code spellcheck="false">#run=frontendStartup</code> label in <aclass="reference-link" href="#root/_help_zEY4DaJG4YT5">Attributes</a>.</li></ol><h2>Content of the script</h2>-<p>Copy-paste the following script:</p><pre><code class="language-application-javascript-env-backend">api.addButtonToToolbar({+<p>Copy-paste the following script:</p><pre><code class="language-text-javascript">api.addButtonToToolbar({title: "New task",icon: "task",shortcut: "alt+n",diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Examples/Using promoted attributes to c.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Examples/Using promoted attributes to c.htmlindex 08ea0c0d25..3cf9a08a2a 100644--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Examples/Using promoted attributes to c.html+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Examples/Using promoted attributes to c.html@@ -9,7 +9,7 @@<p>Instead of asking the user to modify a boolean value in the script, it'smuch more intuitive to use a checkbox for it as a promoted attribute.</p><p>To do so, first define the promoted attribute:</p><pre><code class="language-text-x-trilium-auto">#label:groupByExtension="promoted,alias=Group by extension,single,boolean"</code></pre>-<p>Then use it:</p><pre><code class="language-application-javascript-env-backend">const byExtension = api.currentNote.getLabelValue("groupByExtension") === "true";+<p>Then use it:</p><pre><code class="language-text-javascript">const byExtension = api.currentNote.getLabelValue("groupByExtension") === "true";if (byExtension) {// Do something.}</code></pre>@@ -19,7 +19,7 @@ if (byExtension) {perhaps output its result in another note. To do so we need to define thefollowing promoted attributes:</p><pre><code class="language-text-x-trilium-auto">#relation:input="promoted,alias=Input,single" #relation:output="promoted,alias=Output,single"</code></pre><p>Once we have this, we can add some basic error handling to ensure that- the fields are completed by the user:</p><pre><code class="language-application-javascript-env-backend">const inputNoteId = api.currentNote.getRelationValue("input");+ the fields are completed by the user:</p><pre><code class="language-text-javascript">const inputNoteId = api.currentNote.getRelationValue("input");if (!inputNoteId) {api.showError("Missing input.");return;@@ -34,7 +34,7 @@ if (!outputNoteId) {is only available for frontend notes. If you are writing a backend note,simply remove <code spellcheck="false">api.showError</code> but the userwill no feedback on why the script did not execute properly.</p>-<p>Afterwards we can simply read the note and do something with it:</p><pre><code class="language-application-javascript-env-backend">const note = api.getNote(inputNoteId);+<p>Afterwards we can simply read the note and do something with it:</p><pre><code class="language-text-javascript">const note = api.getNote(inputNoteId);if (!note) {return;}diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Launch Bar Widgets/Analog Watch.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Launch Bar Widgets/Analog Watch.htmlindex e9625e39b7..0de549f1c0 100644--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Launch Bar Widgets/Analog Watch.html+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Launch Bar Widgets/Analog Watch.html@@ -4,7 +4,7 @@</figure><p>This is a more intricate example of a basic widget, which displays ananalog watch in the launch bar. Unlike note-context aware widgets, basic- widgets don't react to note navigation.</p><pre><code class="language-application-javascript-env-backend">const TPL = `+ widgets don't react to note navigation.</p><pre><code class="language-text-javascript">const TPL = `<div class="analog-watch" style="position: relative;height: 38px;diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Launch Bar Widgets/Note Title Widget.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Launch Bar Widgets/Note Title Widget.htmlindex 5386d00521..7f28353784 100644--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Launch Bar Widgets/Note Title Widget.html+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Launch Bar Widgets/Note Title Widget.html@@ -7,7 +7,7 @@through the notes.</p><h2>Legacy widget</h2><p>In this example, the title of the note is displayed. It works best on- the <a href="#root/_help_x0JgW8UqGXvq">horizontal layout</a>.</p><pre><code class="language-application-javascript-env-backend">const TPL = `\+ the <a href="#root/_help_x0JgW8UqGXvq">horizontal layout</a>.</p><pre><code class="language-text-javascript">const TPL = `\<div style="display: flex;height: 53px;diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Script API/Day.js.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Script API/Day.js.htmlindex 44c0f9df64..ed34dacc37 100644--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Script API/Day.js.html+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Script API/Day.js.html@@ -3,7 +3,7 @@about the library itself, consult the <a href="https://day.js.org/en/">official documentation</a>.</p><h2>How to use</h2><p>The <code spellcheck="false">dayjs</code> method is provided directly in- the <code spellcheck="false">api</code> global:</p><pre><code class="language-application-javascript-env-backend">const date = api.dayjs();+ the <code spellcheck="false">api</code> global:</p><pre><code class="language-text-javascript">const date = api.dayjs();api.log(date.format("YYYY-MM-DD"));</code></pre><h2>Plugins</h2><p>Day.js uses a modular, plugin-based architecture. Generally these pluginsdiff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Security.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Security.htmlindex f7d47173f9..f138c72ef8 100644--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Security.html+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Security.html@@ -1,16 +1,16 @@<p>Starting with v0.104.0, some features in Trilium are intentionally disabledin order to reduce the attack surface:</p><ul>- <li><a class="reference-link" href="#root/pOsGYCXsbNQG/CdNpE2pqjmI6/_help_SPirpZypehBG">Backend scripts</a>,+ <li><a class="reference-link" href="#root/_help_SPirpZypehBG">Backend scripts</a>,which can run processes on the server, access the file system or bypasssecurity measures.</li>- <li><a class="reference-link" href="#root/pOsGYCXsbNQG/tC7s2alapj8V/wX4HbRucYSDD/oyIAJ9PvvwHX/_help_YKWqdJhzi2VY">SQL Console</a>,- which can be used to exfiltrate important data such as the document secret- or cause irreparable damage to the database.</li>+ <li><a class="reference-link" href="#root/_help_YKWqdJhzi2VY">SQL Console</a>, which+ can be used to exfiltrate important data such as the document secret or+ cause irreparable damage to the database.</li></ul><p>To activate either one of them, there are three variants:</p><ul>- <li>For the desktop app, go to <a class="reference-link" href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/Vc8PjrjAGuOp/_help_4TIF1oA4VQRO">Options</a> → <em>Security</em> and+ <li>For the desktop app, go to <a class="reference-link" href="#root/_help_4TIF1oA4VQRO">Options</a> → <em>Security</em> andtoggle the desired option.<ul><li>This will prompt a system dialog confirming the change. Note that scripts@@ -20,11 +20,10 @@options need to be manually toggled using the other mechanisms describedhere.</li><li>This works by setting a separate configuration file in the <a class="reference-link"- href="#root/pOsGYCXsbNQG/Otzi9La2YAUX/_help_tAassRL4RSQL">Data directory</a>.</li>+ href="#root/_help_tAassRL4RSQL">Data directory</a>.</li></ul></li>- <li>In <a href="#root/pOsGYCXsbNQG/tC7s2alapj8V/_help_Gzjqa934BdH4">config.ini</a>,- set the corresponding option under the <code spellcheck="false">Security</code> group.</li>- <li- >Or use environment variables (e.g. <code spellcheck="false">TRILIUM_SECURITY_BACKEND_SCRIPTING_ENABLED=true</code>).</li>+ <li>In <a href="#root/_help_Gzjqa934BdH4">config.ini</a>, set the corresponding option+ under the <code spellcheck="false">Security</code> group.</li>+ <li>Or use environment variables (e.g. <code spellcheck="false">TRILIUM_SECURITY_BACKEND_SCRIPTING_ENABLED=true</code>).</li></ul>\ No newline at end of filediff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Theme development/Creating an icon pack.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Theme development/Creating an icon pack.htmlindex e4af1aad7d..b8d7b68d1e 100644--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Theme development/Creating an icon pack.html+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Theme development/Creating an icon pack.html@@ -136,7 +136,7 @@]}</code></pre><p>A tiny Node.js script to produce the manifest (place <code spellcheck="false">selection.json</code> in- the same directory and run with Node 20+):</p><pre><code class="language-application-javascript-env-backend">import { join } from "node:path";+ the same directory and run with Node 20+):</p><pre><code class="language-text-javascript">import { join } from "node:path";import { readFileSync, writeFileSync } from "node:fs";function processIconPack(packName) {diff --git a/apps/server/src/assets/llm/skills/backend_scripting.md b/apps/server/src/assets/llm/skills/backend_scripting.mdindex 0c56253fb5..1efeb49866 100644--- a/apps/server/src/assets/llm/skills/backend_scripting.md+++ b/apps/server/src/assets/llm/skills/backend_scripting.md@@ -4,7 +4,7 @@ Backend scripts run in Node.js on the server. They have direct access to notes i## Creating a backend script-1. Create a Code note with language "JS backend".+1. Create a Code note with language "JavaScript (Trilium backend)".2. The script can be run manually (Execute button) or triggered automatically.## Async code — IMPORTANTdiff --git a/apps/server/src/assets/llm/skills/frontend_scripting.md b/apps/server/src/assets/llm/skills/frontend_scripting.mdindex 527f9b948f..40edd4dff7 100644--- a/apps/server/src/assets/llm/skills/frontend_scripting.md+++ b/apps/server/src/assets/llm/skills/frontend_scripting.md@@ -8,7 +8,7 @@ CRITICAL: In JSX notes, always use top-level `import` statements (e.g. `import {## Creating a frontend script-1. Create a Code note with language "JSX" (preferred) or "JS frontend" (legacy only).+1. Create a Code note with language "JSX" (preferred) or "JavaScript (Trilium frontend)" (legacy only).2. Add `#widget` label for widgets, or `#run=frontendStartup` for auto-run scripts.3. For mobile, use `#run=mobileStartup` instead.@@ -17,7 +17,7 @@ CRITICAL: In JSX notes, always use top-level `import` statements (e.g. `import {| Type | Language | Required attribute ||---|---|---|| Custom widget | JSX (preferred) | `#widget` |-| Regular script | JS frontend | `#run=frontendStartup` (optional) |+| Regular script | JavaScript (Trilium frontend) | `#run=frontendStartup` (optional) || Render note | JSX | None (used via `~renderNote` relation) |## Custom widgets (Preact JSX) — preferred@@ -182,7 +182,7 @@ import { showMessage } from "trilium:api";## Script API-In JSX, use `import { method } from "trilium:api"`. In JS frontend, use the `api` global.+In JSX, use `import { method } from "trilium:api"`. In JavaScript (Trilium frontend), use the `api` global.### Navigation & tabs- `activateNote(notePath)` - navigate to a note@@ -330,7 +330,7 @@ Avoid `require("electron")`, `@electron/remote`, and `process` — `nodeIntegratOnly use legacy widgets if you specifically need jQuery or cannot use JSX.```javascript-// Language: JS frontend, Label: #widget+// Language: JavaScript (Trilium frontend), Label: #widgetclass MyWidget extends api.BasicWidget {get position() { return 1; }get parentWidget() { return "center-pane"; }@@ -354,4 +354,4 @@ Key differences from Preact:## Module system-For JSX, use `import`/`export` syntax between notes. For JS frontend, use `module.exports` and function parameters matching child note titles.+For JSX, use `import`/`export` syntax between notes. For JavaScript (Trilium frontend), use `module.exports` and function parameters matching child note titles.diff --git a/docs/User Guide/!!!meta.json b/docs/User Guide/!!!meta.jsonindex 7fed480fcb..35a8821fad 100644--- a/docs/User Guide/!!!meta.json+++ b/docs/User Guide/!!!meta.json@@ -15290,31 +15290,38 @@{"type": "relation","name": "internalLink",- "value": "x3i7MxGccDuM",+ "value": "fiHicjpHjIRJ","isInheritable": false,"position": 10},{"type": "relation","name": "internalLink",- "value": "l0tKav7yLHGF",+ "value": "x3i7MxGccDuM","isInheritable": false,"position": 20},{"type": "relation","name": "internalLink",- "value": "IjZS7iK5EXtb",+ "value": "l0tKav7yLHGF","isInheritable": false,"position": 30},{"type": "relation","name": "internalLink",- "value": "XpOYSgsLkTJy",+ "value": "IjZS7iK5EXtb","isInheritable": false,"position": 40},+ {+ "type": "relation",+ "name": "internalLink",+ "value": "XpOYSgsLkTJy",+ "isInheritable": false,+ "position": 50+ },{"type": "label","name": "iconClass",@@ -15328,13 +15335,6 @@"value": "sql-console","isInheritable": false,"position": 40- },- {- "type": "relation",- "name": "internalLink",- "value": "fiHicjpHjIRJ",- "isInheritable": false,- "position": 50}],"format": "markdown",@@ -18182,24 +18182,31 @@{"type": "relation","name": "internalLink",- "value": "6f9hih2hXXZk",+ "value": "fiHicjpHjIRJ","isInheritable": false,"position": 40},{"type": "relation","name": "internalLink",- "value": "GPERMystNGTB",+ "value": "6f9hih2hXXZk","isInheritable": false,"position": 50},{"type": "relation","name": "internalLink",- "value": "MEtfsqa5VwNi",+ "value": "GPERMystNGTB","isInheritable": false,"position": 60},+ {+ "type": "relation",+ "name": "internalLink",+ "value": "MEtfsqa5VwNi",+ "isInheritable": false,+ "position": 70+ },{"type": "label","name": "shareAlias",@@ -18213,13 +18220,6 @@"value": "bx bx-server","isInheritable": false,"position": 40- },- {- "type": "relation",- "name": "internalLink",- "value": "fiHicjpHjIRJ",- "isInheritable": false,- "position": 70}],"format": "markdown",@@ -18899,46 +18899,46 @@"mime": "text/html","attributes": [{- "type": "label",- "name": "iconClass",- "value": "bx bx-shield",+ "type": "relation",+ "name": "internalLink",+ "value": "SPirpZypehBG","isInheritable": false,- "position": 30+ "position": 10},{"type": "relation","name": "internalLink",- "value": "SPirpZypehBG",+ "value": "YKWqdJhzi2VY","isInheritable": false,- "position": 40+ "position": 20},{"type": "relation","name": "internalLink",- "value": "YKWqdJhzi2VY",+ "value": "4TIF1oA4VQRO","isInheritable": false,- "position": 50+ "position": 30},{"type": "relation","name": "internalLink","value": "tAassRL4RSQL","isInheritable": false,- "position": 60+ "position": 40},{"type": "relation","name": "internalLink","value": "Gzjqa934BdH4","isInheritable": false,- "position": 70+ "position": 50},{- "type": "relation",- "name": "internalLink",- "value": "4TIF1oA4VQRO",+ "type": "label",+ "name": "iconClass",+ "value": "bx bx-shield","isInheritable": false,- "position": 80+ "position": 30}],"format": "markdown",diff --git a/docs/User Guide/User Guide/Scripting/Backend scripts.md b/docs/User Guide/User Guide/Scripting/Backend scripts.mdindex 7b13871d1f..7b000fba10 100644--- a/docs/User Guide/User Guide/Scripting/Backend scripts.md+++ b/docs/User Guide/User Guide/Scripting/Backend scripts.md@@ -14,7 +14,7 @@ However, the main benefit of backend scripts is that they have easier access to## Creating a backend script-Create a new <a class="reference-link" href="../Note%20Types/Code.md">Code</a> note and select the language _JS backend_.+Create a new <a class="reference-link" href="../Note%20Types/Code.md">Code</a> note and select the language _JavaScript (Trilium backend)_.## Running backend scriptsdiff --git a/docs/User Guide/User Guide/Scripting/Backend scripts/Events.md b/docs/User Guide/User Guide/Scripting/Backend scripts/Events.mdindex ff6f1973e4..40a2aa4300 100644--- a/docs/User Guide/User Guide/Scripting/Backend scripts/Events.md+++ b/docs/User Guide/User Guide/Scripting/Backend scripts/Events.md@@ -1,5 +1,5 @@# Events-[Script](../../Scripting.md) notes can be triggered by events. Note that these are backend events and thus relation need to point to the "JS backend" code note.+[Script](../../Scripting.md) notes can be triggered by events. Note that these are backend events and thus relation need to point to the "JavaScript (Trilium backend)" code note.## Global eventsdiff --git a/docs/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Word count widget.md b/docs/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Word count widget.mdindex 137e7ec414..15e01bc67f 100644--- a/docs/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Word count widget.md+++ b/docs/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Word count widget.md@@ -2,7 +2,7 @@> [!TIP]> This widget is also present in new installations in the <a class="reference-link" href="../../../Advanced%20Usage/Database/Demo%20Notes.md">Demo Notes</a>.-Create a <a class="reference-link" href="../../../Note%20Types/Code.md">Code</a> note of type JS frontend and **give it a** `#widget` **label**.+Create a <a class="reference-link" href="../../../Note%20Types/Code.md">Code</a> note of type JavaScript (Trilium frontend) and **give it a** `#widget` **label**.```/*diff --git a/docs/User Guide/User Guide/Scripting/Frontend Basics/Examples/New Task launcher button.md b/docs/User Guide/User Guide/Scripting/Frontend Basics/Examples/New Task launcher button.mdindex 6740c047f7..efc76c5ec1 100644--- a/docs/User Guide/User Guide/Scripting/Frontend Basics/Examples/New Task launcher button.md+++ b/docs/User Guide/User Guide/Scripting/Frontend Basics/Examples/New Task launcher button.md@@ -3,7 +3,7 @@ In this example we are going to extend the functionality of <a class="reference## Creating the note-1. First, create a new <a class="reference-link" href="../../../Note%20Types/Code.md">Code</a> note type with the _JS frontend_ language.+1. First, create a new <a class="reference-link" href="../../../Note%20Types/Code.md">Code</a> note type with the _JavaScript (Trilium frontend)_ language.2. Define the `#run=frontendStartup` label in <a class="reference-link" href="../../../Advanced%20Usage/Attributes.md">Attributes</a>.## Content of the script