Merge remote-tracking branch 'origin/develop' into feature/touchbar

This commit is contained in:
Elian Doran
2025-04-13 22:55:44 +03:00
1292 changed files with 28141 additions and 110482 deletions

View File

@@ -138,7 +138,7 @@ export type CommandMappings = {
insertNoteAfter: ContextMenuCommandData;
insertChildNote: ContextMenuCommandData;
delete: ContextMenuCommandData;
editNoteTitle: ContextMenuCommandData;
editNoteTitle: {};
protectSubtree: ContextMenuCommandData;
unprotectSubtree: ContextMenuCommandData;
openBulkActionsDialog:

View File

@@ -10,23 +10,18 @@ import Component from "./component.js";
* must be at the root of the component tree.
*/
export default class MainTreeExecutors extends Component {
/**
* On mobile it will be `undefined`.
*/
get tree() {
return appContext.noteTreeWidget;
}
async cloneNotesToCommand({ selectedOrActiveNoteIds }: EventData<"cloneNotesTo">) {
if (!this.tree) {
return;
}
this.triggerCommand("cloneNoteIdsTo", { noteIds: selectedOrActiveNoteIds });
}
async moveNotesToCommand({ selectedOrActiveBranchIds }: EventData<"moveNotesTo">) {
if (!this.tree) {
return;
}
this.triggerCommand("moveBranchIdsTo", { branchIds: selectedOrActiveBranchIds });
}

File diff suppressed because one or more lines are too long

View File

@@ -1,21 +0,0 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="style.css">
<base target="_parent">
<title data-trilium-title>User Guide</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>User Guide</h1>
<div class="ck-content">
<p>The sub-children of this note are automatically synced.</p>
</div>
</div>
</body>
</html>

View File

@@ -1,37 +1,17 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../style.css">
<base target="_parent">
<title data-trilium-title>Advanced Showcases</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Advanced Showcases</h1>
<div class="ck-content">
<p>Trilium offers advanced functionality through <a href="#root/_help_CdNpE2pqjmI6">Scripts</a> and
<a
href="#root/_help_OFXdgB2nNk1F">Promoted Attributes</a>. To illustrate these features, we've prepared
several showcases available in the <a href="#root/_help_wX4HbRucYSDD">demo notes</a>:</p>
<ul>
<li><a href="#root/_help_iRwzGnHPzonm">Relation Map</a>
</li>
<li><a href="#root/_help_l0tKav7yLHGF">Day Notes</a>
</li>
<li><a href="#root/_help_R7abl2fc6Mxi">Weight Tracker</a>
</li>
<li><a href="#root/_help_xYjQUYhpbUEW">Task Manager</a>
</li>
</ul>
<p>It's important to note that these examples are not natively supported
by Trilium out of the box; instead, they demonstrate what you can build
within Trilium.</p>
</div>
</div>
</body>
</html>
<p>Trilium offers advanced functionality through <a href="#root/_help_CdNpE2pqjmI6">Scripts</a> and
<a
href="#root/_help_OFXdgB2nNk1F">Promoted Attributes</a>. To illustrate these features, we've prepared
several showcases available in the <a href="#root/_help_wX4HbRucYSDD">demo notes</a>:</p>
<ul>
<li><a href="#root/_help_iRwzGnHPzonm">Relation Map</a>
</li>
<li><a href="#root/_help_l0tKav7yLHGF">Day Notes</a>
</li>
<li><a href="#root/_help_R7abl2fc6Mxi">Weight Tracker</a>
</li>
<li><a href="#root/_help_xYjQUYhpbUEW">Task Manager</a>
</li>
</ul>
<p>It's important to note that these examples are not natively supported
by Trilium out of the box; instead, they demonstrate what you can build
within Trilium.</p>

View File

@@ -1,166 +1,146 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../style.css">
<base target="_parent">
<title data-trilium-title>Day Notes</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Day Notes</h1>
<div class="ck-content">
<p>A common pattern in note-taking is that a lot of notes will be centered
around a certain date - e.g. you have some tasks which needs to be done
on a certain date, you have meeting minutes from a certain date, you have
your thoughts etc. and it all revolves around a date on which they occurred.
For this reason, it makes sense to create a certain "day workspace" which
will centralize all those notes relevant for a certain date.</p>
<p>For this, Trilium provides a concept of "day note". Trilium semi-automatically
generates a single note for each day. Under this note you can save all
those relevant notes.</p>
<p>Select an existing day note, and the menubar contains a calendar widget.
Select any day to create a note for that day.&nbsp;</p>
<p>
<img src="1_Day Notes_image.png">
</p>
<p>This pattern works well also because of <a href="#root/_help_IakOLONlIfGI">Cloning Notes</a> functionality
- note can appear in multiple places in the note tree, so besides appearing
under day note, it can also be categorized into other notes.</p>
<h2>Demo</h2>
<p>
<img src="Day Notes_image.png">
</p>
<p>You can see the structure of day notes appearing under "Journal" note
- there's a note for the whole year 2025, under it, you have "03 - March"
which then contains "09 - Monday". This is our "day note" which contains
some text in its content and also has some child notes (some of them are
from <a href="#root/_help_xYjQUYhpbUEW">Task manager</a>).</p>
<p>You can also notice how this day note has <a href="#root/_help_OFXdgB2nNk1F">promoted attribute</a> "weight"
where you can track your daily weight. This data is then used in <a href="#root/_help_R7abl2fc6Mxi">Weight tracker</a>.</p>
<h2>Week Note and Quarter Note</h2>
<p>Week and quarter notes are disabled by default, since it might be too
much for some people. To enable them, you need to set <code>#enableWeekNotes</code> and <code>#enableQuarterNotes</code> attributes
on the root calendar note, which is identified by <code>#calendarRoot</code> label.
Week note is affected by the first week of year option. Be careful when
you already have some week notes created, it will not automatically change
the existing week notes and might lead to some duplicates.</p>
<h2>Templates</h2>
<p>Trilium provides <a href="#root/_help_KC1HB96bqqHX">template</a> functionality,
and it could be used together with day notes.</p>
<p>You can define one of the following relations on the root of the journal
(identified by <code>#calendarRoot</code> label):</p>
<ul>
<li>yearTemplate</li>
<li>quarterTemplate (if <code>#enableQuarterNotes</code> is set)</li>
<li>monthTemplate</li>
<li>weekTemplate (if <code>#enableWeekNotes</code> is set)</li>
<li>dateTemplate</li>
</ul>
<p>All of these are relations. When Trilium creates a new note for year or
month or date, it will take a look at the root and attach a corresponding <code>~template</code> relation
to the newly created role. Using this, you can e.g. create your daily template
with e.g. checkboxes for daily routine etc.</p>
<h2>Naming pattern</h2>
<p>You can customize the title of generated journal notes by defining a <code>#datePattern</code>, <code>#weekPattern</code>, <code>#monthPattern</code>, <code>#quarterPattern</code> and <code>#yearPattern</code> attribute
on a root calendar note (identified by <code>#calendarRoot</code> label).
The naming pattern replacements follow a level-up compatibility - each
level can use replacements from itself and all levels above it. For example, <code>#monthPattern</code> can
use month, quarter and year replacements, while <code>#weekPattern</code> can
use week, month, quarter and year replacements. But it is not possible
to use week replacements in <code>#monthPattern</code>.</p>
<h3>Date pattern</h3>
<p>It's possible to customize the title of generated date notes by defining
a <code>#datePattern</code> attribute on a root calendar note (identified
by <code>#calendarRoot</code> label). Following are possible values:</p>
<ul>
<li><code>{isoDate}</code> results in an ISO 8061 formatted date (e.g. "2025-03-09"
for March 9, 2025)</li>
<li><code>{dateNumber}</code> results in a number like <code>9</code> for the
9th day of the month, <code>11</code> for the 11th day of the month</li>
<li><code>{dateNumberPadded}</code> results in a number like <code>09</code> for
the 9th day of the month, <code>11</code> for the 11th day of the month</li>
<li><code>{ordinal}</code> is replaced with the ordinal date (e.g. 1st, 2nd,
3rd) etc.</li>
<li><code>{weekDay}</code> results in the full day name (e.g. <code>Monday</code>)</li>
<li><code>{weekDay3}</code> is replaced with the first 3 letters of the day,
e.g. Mon, Tue, etc.</li>
<li><code>{weekDay2}</code> is replaced with the first 2 letters of the day,
e.g. Mo, Tu, etc.</li>
</ul>
<p>The default is <code>{dateNumberPadded} - {weekDay}</code>
</p>
<h3>Week pattern</h3>
<p>It is also possible to customize the title of generated week notes through
the <code>#weekPattern</code> attribute on the root calendar note. The options
are:</p>
<ul>
<li><code>{weekNumber}</code> results in a number like <code>9</code> for the
9th week of the year, <code>11</code> for the 11th week of the year</li>
<li><code>{weekNumberPadded}</code> results in a number like <code>09</code> for
the 9th week of the year, <code>11</code> for the 11th week of the year</li>
<li><code>{shortWeek}</code> results in a short week string like <code>W9</code> for
the 9th week of the year, <code>W11</code> for the 11th week of the year</li>
<li><code>{shortWeek3}</code> results in a short week string like <code>W09</code> for
the 9th week of the year, <code>W11</code> for the 11th week of the year</li>
</ul>
<p>The default is <code>Week {weekNumber}</code>
</p>
<h3>Month pattern</h3>
<p>It is also possible to customize the title of generated month notes through
the <code>#monthPattern</code> attribute on the root calendar note. The options
are:</p>
<ul>
<li><code>{isoMonth}</code> results in an ISO 8061 formatted month (e.g. "2025-03"
for March 2025)</li>
<li><code>{monthNumber}</code> results in a number like <code>9</code> for September,
and <code>11</code> for November</li>
<li><code>{monthNumberPadded}</code> results in a number like <code>09</code> for
September, and <code>11</code> for November</li>
<li><code>{month}</code> results in the full month name (e.g. <code>September</code> or <code>October</code>)</li>
<li><code>{shortMonth3}</code> is replaced with the first 3 letters of the
month, e.g. Jan, Feb, etc.</li>
<li><code>{shortMonth4}</code> is replaced with the first 4 letters of the
month, e.g. Sept, Octo, etc.</li>
</ul>
<p>The default is <code>{monthNumberPadded} - {month}</code>
</p>
<h3>Quarter pattern</h3>
<p>It is also possible to customize the title of generated quarter notes
through the <code>#quarterPattern</code> attribute on the root calendar note.
The options are:</p>
<ul>
<li><code>{quarterNumber}</code> results in a number like <code>1</code> for
the 1st quarter of the year</li>
<li><code>{shortQuarter}</code> results in a short quarter string like <code>Q1</code> for
the 1st quarter of the year</li>
</ul>
<p>The default is <code>Quarter {quarterNumber}</code>
</p>
<h3>Year pattern</h3>
<p>It is also possible to customize the title of generated year notes through
the <code>#yearPattern</code> attribute on the root calendar note. The options
are:</p>
<ul>
<li><code>{year}</code> results in the full year (e.g. <code>2025</code>)</li>
</ul>
<p>The default is <code>{year}</code>
</p>
<h2>Implementation</h2>
<p>Trilium has some special support for day notes in the form of <a href="https://triliumnext.github.io/Notes/backend_api/BackendScriptApi.html">backend Script API</a> -
see e.g. getDayNote() function.</p>
<p>Day (and year, month) notes are created with a label - e.g. <code>#dateNote="2025-03-09"</code> this
can then be used by other scripts to add new notes to day note etc.</p>
<p>Journal also has relation <code>child:child:child:template=Day template</code> (see
[[attribute inheritance]]) which effectively adds [[template]] to day notes
(grand-grand-grand children of Journal). Please note that, when you enable
week notes or quarter notes, it will not automatically change the relation
for the child level.</p>
</div>
</div>
</body>
</html>
<p>A common pattern in note-taking is that a lot of notes will be centered
around a certain date - e.g. you have some tasks which needs to be done
on a certain date, you have meeting minutes from a certain date, you have
your thoughts etc. and it all revolves around a date on which they occurred.
For this reason, it makes sense to create a certain "day workspace" which
will centralize all those notes relevant for a certain date.</p>
<p>For this, Trilium provides a concept of "day note". Trilium semi-automatically
generates a single note for each day. Under this note you can save all
those relevant notes.</p>
<p>Select an existing day note, and the menubar contains a calendar widget.
Select any day to create a note for that day.&nbsp;</p>
<p>
<img src="1_Day Notes_image.png">
</p>
<p>This pattern works well also because of <a href="#root/_help_IakOLONlIfGI">Cloning Notes</a> functionality
- note can appear in multiple places in the note tree, so besides appearing
under day note, it can also be categorized into other notes.</p>
<h2>Demo</h2>
<p>
<img src="Day Notes_image.png">
</p>
<p>You can see the structure of day notes appearing under "Journal" note
- there's a note for the whole year 2025, under it, you have "03 - March"
which then contains "09 - Monday". This is our "day note" which contains
some text in its content and also has some child notes (some of them are
from <a href="#root/_help_xYjQUYhpbUEW">Task manager</a>).</p>
<p>You can also notice how this day note has <a href="#root/_help_OFXdgB2nNk1F">promoted attribute</a> "weight"
where you can track your daily weight. This data is then used in <a href="#root/_help_R7abl2fc6Mxi">Weight tracker</a>.</p>
<h2>Week Note and Quarter Note</h2>
<p>Week and quarter notes are disabled by default, since it might be too
much for some people. To enable them, you need to set <code>#enableWeekNotes</code> and <code>#enableQuarterNotes</code> attributes
on the root calendar note, which is identified by <code>#calendarRoot</code> label.
Week note is affected by the first week of year option. Be careful when
you already have some week notes created, it will not automatically change
the existing week notes and might lead to some duplicates.</p>
<h2>Templates</h2>
<p>Trilium provides <a href="#root/_help_KC1HB96bqqHX">template</a> functionality,
and it could be used together with day notes.</p>
<p>You can define one of the following relations on the root of the journal
(identified by <code>#calendarRoot</code> label):</p>
<ul>
<li>yearTemplate</li>
<li>quarterTemplate (if <code>#enableQuarterNotes</code> is set)</li>
<li>monthTemplate</li>
<li>weekTemplate (if <code>#enableWeekNotes</code> is set)</li>
<li>dateTemplate</li>
</ul>
<p>All of these are relations. When Trilium creates a new note for year or
month or date, it will take a look at the root and attach a corresponding <code>~template</code> relation
to the newly created role. Using this, you can e.g. create your daily template
with e.g. checkboxes for daily routine etc.</p>
<h2>Naming pattern</h2>
<p>You can customize the title of generated journal notes by defining a <code>#datePattern</code>, <code>#weekPattern</code>, <code>#monthPattern</code>, <code>#quarterPattern</code> and <code>#yearPattern</code> attribute
on a root calendar note (identified by <code>#calendarRoot</code> label).
The naming pattern replacements follow a level-up compatibility - each
level can use replacements from itself and all levels above it. For example, <code>#monthPattern</code> can
use month, quarter and year replacements, while <code>#weekPattern</code> can
use week, month, quarter and year replacements. But it is not possible
to use week replacements in <code>#monthPattern</code>.</p>
<h3>Date pattern</h3>
<p>It's possible to customize the title of generated date notes by defining
a <code>#datePattern</code> attribute on a root calendar note (identified
by <code>#calendarRoot</code> label). Following are possible values:</p>
<ul>
<li><code>{isoDate}</code> results in an ISO 8061 formatted date (e.g. "2025-03-09"
for March 9, 2025)</li>
<li><code>{dateNumber}</code> results in a number like <code>9</code> for the
9th day of the month, <code>11</code> for the 11th day of the month</li>
<li><code>{dateNumberPadded}</code> results in a number like <code>09</code> for
the 9th day of the month, <code>11</code> for the 11th day of the month</li>
<li><code>{ordinal}</code> is replaced with the ordinal date (e.g. 1st, 2nd,
3rd) etc.</li>
<li><code>{weekDay}</code> results in the full day name (e.g. <code>Monday</code>)</li>
<li><code>{weekDay3}</code> is replaced with the first 3 letters of the day,
e.g. Mon, Tue, etc.</li>
<li><code>{weekDay2}</code> is replaced with the first 2 letters of the day,
e.g. Mo, Tu, etc.</li>
</ul>
<p>The default is <code>{dateNumberPadded} - {weekDay}</code>
</p>
<h3>Week pattern</h3>
<p>It is also possible to customize the title of generated week notes through
the <code>#weekPattern</code> attribute on the root calendar note. The options
are:</p>
<ul>
<li><code>{weekNumber}</code> results in a number like <code>9</code> for the
9th week of the year, <code>11</code> for the 11th week of the year</li>
<li><code>{weekNumberPadded}</code> results in a number like <code>09</code> for
the 9th week of the year, <code>11</code> for the 11th week of the year</li>
<li><code>{shortWeek}</code> results in a short week string like <code>W9</code> for
the 9th week of the year, <code>W11</code> for the 11th week of the year</li>
<li><code>{shortWeek3}</code> results in a short week string like <code>W09</code> for
the 9th week of the year, <code>W11</code> for the 11th week of the year</li>
</ul>
<p>The default is <code>Week {weekNumber}</code>
</p>
<h3>Month pattern</h3>
<p>It is also possible to customize the title of generated month notes through
the <code>#monthPattern</code> attribute on the root calendar note. The options
are:</p>
<ul>
<li><code>{isoMonth}</code> results in an ISO 8061 formatted month (e.g. "2025-03"
for March 2025)</li>
<li><code>{monthNumber}</code> results in a number like <code>9</code> for September,
and <code>11</code> for November</li>
<li><code>{monthNumberPadded}</code> results in a number like <code>09</code> for
September, and <code>11</code> for November</li>
<li><code>{month}</code> results in the full month name (e.g. <code>September</code> or <code>October</code>)</li>
<li><code>{shortMonth3}</code> is replaced with the first 3 letters of the
month, e.g. Jan, Feb, etc.</li>
<li><code>{shortMonth4}</code> is replaced with the first 4 letters of the
month, e.g. Sept, Octo, etc.</li>
</ul>
<p>The default is <code>{monthNumberPadded} - {month}</code>
</p>
<h3>Quarter pattern</h3>
<p>It is also possible to customize the title of generated quarter notes
through the <code>#quarterPattern</code> attribute on the root calendar note.
The options are:</p>
<ul>
<li><code>{quarterNumber}</code> results in a number like <code>1</code> for
the 1st quarter of the year</li>
<li><code>{shortQuarter}</code> results in a short quarter string like <code>Q1</code> for
the 1st quarter of the year</li>
</ul>
<p>The default is <code>Quarter {quarterNumber}</code>
</p>
<h3>Year pattern</h3>
<p>It is also possible to customize the title of generated year notes through
the <code>#yearPattern</code> attribute on the root calendar note. The options
are:</p>
<ul>
<li><code>{year}</code> results in the full year (e.g. <code>2025</code>)</li>
</ul>
<p>The default is <code>{year}</code>
</p>
<h2>Implementation</h2>
<p>Trilium has some special support for day notes in the form of <a href="https://triliumnext.github.io/Notes/backend_api/BackendScriptApi.html">backend Script API</a> -
see e.g. getDayNote() function.</p>
<p>Day (and year, month) notes are created with a label - e.g. <code>#dateNote="2025-03-09"</code> this
can then be used by other scripts to add new notes to day note etc.</p>
<p>Journal also has relation <code>child:child:child:template=Day template</code> (see
[[attribute inheritance]]) which effectively adds [[template]] to day notes
(grand-grand-grand children of Journal). Please note that, when you enable
week notes or quarter notes, it will not automatically change the relation
for the child level.</p>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 59 KiB

View File

@@ -1,48 +1,33 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../style.css">
<base target="_parent">
<title data-trilium-title>Task Manager</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Task Manager</h1>
<div class="ck-content">
<p>Task Manager is a <a href="#root/_help_OFXdgB2nNk1F">promoted attributes</a> and
<a
href="#root/_help_CdNpE2pqjmI6">scripts</a>showcase present in the <a href="#root/_help_wX4HbRucYSDD">demo notes</a>.</p>
<h2>Demo</h2>
<p>
<img src="Task Manager_task-manager.png">
</p>
<p>Task Manager manages outstanding (TODO) tasks and finished tasks (non-empty
doneDate attribute). Outstanding tasks are further categorized by location
and arbitrary tags - whenever you change tag attribute in the task note,
this task is then automatically moved to appropriate location.</p>
<p>Task Manager also integrates with <a href="#root/_help_l0tKav7yLHGF">day notes</a> -
notes are <a href="#root/_help_IakOLONlIfGI">cloned</a> into day note to
both todoDate note and doneDate note (with <a href="#root/_help_kBrnXNG3Hplm">prefix</a> of
either "TODO" or "DONE").</p>
<h2>Implementation</h2>
<p>New tasks are created in the TODO note which has <code>~child:template</code>
<a
href="#root/_help_zEY4DaJG4YT5">relation</a>(see <a href="#root/_help_bwZpz2ajCEwO">attribute inheritance</a>)
pointing to the task template.</p>
<h3>Attributes</h3>
<p>Task template defines several <a href="#root/_help_OFXdgB2nNk1F">promoted attributes</a> -
todoDate, doneDate, tags, location. Importantly it also defines <code>~runOnAttributeChange</code> relation
- <a href="#root/_help_GPERMystNGTB">event</a> handler which is run on attribute
change. This <a href="#root/_help_CdNpE2pqjmI6">script</a> handles when e.g.
we fill out the doneDate attribute - meaning the task is done and should
be moved to "Done" note and removed from TODO, locations and tags.</p>
<h3>New task button</h3>
<p>There's also "button" note which contains simple script which adds a button
to create new note (task) in the TODO note.</p><pre><code class="language-text-x-trilium-auto">api.addButtonToToolbar({
<p>Task Manager is a <a href="#root/_help_OFXdgB2nNk1F">promoted attributes</a> and
<a
href="#root/_help_CdNpE2pqjmI6">scripts</a>showcase present in the <a href="#root/_help_wX4HbRucYSDD">demo notes</a>.</p>
<h2>Demo</h2>
<p>
<img src="Task Manager_task-manager.png">
</p>
<p>Task Manager manages outstanding (TODO) tasks and finished tasks (non-empty
doneDate attribute). Outstanding tasks are further categorized by location
and arbitrary tags - whenever you change tag attribute in the task note,
this task is then automatically moved to appropriate location.</p>
<p>Task Manager also integrates with <a href="#root/_help_l0tKav7yLHGF">day notes</a> -
notes are <a href="#root/_help_IakOLONlIfGI">cloned</a> into day note to
both todoDate note and doneDate note (with <a href="#root/_help_kBrnXNG3Hplm">prefix</a> of
either "TODO" or "DONE").</p>
<h2>Implementation</h2>
<p>New tasks are created in the TODO note which has <code>~child:template</code>
<a
href="#root/_help_zEY4DaJG4YT5">relation</a>(see <a href="#root/_help_bwZpz2ajCEwO">attribute inheritance</a>)
pointing to the task template.</p>
<h3>Attributes</h3>
<p>Task template defines several <a href="#root/_help_OFXdgB2nNk1F">promoted attributes</a> -
todoDate, doneDate, tags, location. Importantly it also defines <code>~runOnAttributeChange</code> relation
- <a href="#root/_help_GPERMystNGTB">event</a> handler which is run on attribute
change. This <a href="#root/_help_CdNpE2pqjmI6">script</a> handles when e.g.
we fill out the doneDate attribute - meaning the task is done and should
be moved to "Done" note and removed from TODO, locations and tags.</p>
<h3>New task button</h3>
<p>There's also "button" note which contains simple script which adds a button
to create new note (task) in the TODO note.</p><pre><code class="language-text-x-trilium-auto">api.addButtonToToolbar({
title: 'New task',
icon: 'check',
shortcut: 'alt+n',
@@ -60,26 +45,21 @@
await api.activateNewNote(taskNoteId);
}
});</code></pre>
<h3>CSS</h3>
<p>In the demo screenshot above you may notice that TODO tasks are in red
color and DONE tasks are green.</p>
<p>This is done by having this CSS <a href="#root/_help_6f9hih2hXXZk">code note</a> which
defines extra CSS classes:</p><pre><code class="language-text-x-trilium-auto">span.fancytree-node.todo .fancytree-title {
<h3>CSS</h3>
<p>In the demo screenshot above you may notice that TODO tasks are in red
color and DONE tasks are green.</p>
<p>This is done by having this CSS <a href="#root/_help_6f9hih2hXXZk">code note</a> which
defines extra CSS classes:</p><pre><code class="language-text-x-trilium-auto">span.fancytree-node.todo .fancytree-title {
color: red !important;
}
span.fancytree-node.done .fancytree-title {
color: green !important;
}</code></pre>
<p>This <a href="#root/_help_6f9hih2hXXZk">code note</a> has <code>#appCss</code>
<a
href="#root/_help_zEY4DaJG4YT5">label</a>which is recognized by Trilium on startup and loaded as CSS into
the application.</p>
<p>Second part of this functionality is based in event handler described
above which assigns <code>#cssClass</code> label to the task to either "done"
or "todo" based on the task status.</p>
</div>
</div>
</body>
</html>
<p>This <a href="#root/_help_6f9hih2hXXZk">code note</a> has <code>#appCss</code>
<a
href="#root/_help_zEY4DaJG4YT5">label</a>which is recognized by Trilium on startup and loaded as CSS into
the application.</p>
<p>Second part of this functionality is based in event handler described
above which assigns <code>#cssClass</code> label to the task to either "done"
or "todo" based on the task status.</p>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 191 KiB

After

Width:  |  Height:  |  Size: 158 KiB

View File

@@ -1,43 +1,28 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../style.css">
<base target="_parent">
<title data-trilium-title>Weight Tracker</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Weight Tracker</h1>
<div class="ck-content">
<p>
<img src="Weight Tracker_image.png">
</p>
<p>The <code>Weight Tracker</code> is a <a href="#root/_help_GLks18SNjxmC">Script API</a> showcase
present in the <a href="#root/_help_wX4HbRucYSDD">demo notes</a>.</p>
<p>By adding <code>weight</code> as a <a href="#root/_help_OFXdgB2nNk1F">promoted attribute</a> in
the <a href="#root/_help_KC1HB96bqqHX">template</a> from which <a href="#root/_help_l0tKav7yLHGF">day notes</a> are
created, you can aggregate the data and plot weight change over time.</p>
<h2>Implementation</h2>
<p>The <code>Weight Tracker</code> note in the screenshot above is of the type <code>Render Note</code>.
That type of note doesn't have any useful content itself. Instead it is
a placeholder where a <a href="#root/_help_CdNpE2pqjmI6">script</a> can render
its output.</p>
<p>Scripts for <code>Render Notes</code> are defined in a <a href="#root/_help_zEY4DaJG4YT5">relation</a> called <code>~renderNote</code>.
In this example, it's the <code>Weight Tracker</code>'s child <code>Implementation</code>.
The Implementation consists of two <a href="#root/_help_6f9hih2hXXZk">code notes</a> that
contain some HTML and JavaScript respectively, which load all the notes
with a <code>weight</code> attribute and display their values in a chart.</p>
<p>To actually render the chart, we're using a third party library called
<a
href="https://www.chartjs.org/">chart.js</a>which is imported as an attachment, since it's not built into
Trilium.</p>
<h3>Code</h3>
<p>Here's the content of the script which is placed in a <a href="#root/_help_6f9hih2hXXZk">code note</a> of
type <code>JS Frontend</code>:</p><pre><code class="language-text-x-trilium-auto">async function getChartData() {
<p>
<img src="Weight Tracker_image.png">
</p>
<p>The <code>Weight Tracker</code> is a <a href="#root/_help_GLks18SNjxmC">Script API</a> showcase
present in the <a href="#root/_help_wX4HbRucYSDD">demo notes</a>.</p>
<p>By adding <code>weight</code> as a <a href="#root/_help_OFXdgB2nNk1F">promoted attribute</a> in
the <a href="#root/_help_KC1HB96bqqHX">template</a> from which <a href="#root/_help_l0tKav7yLHGF">day notes</a> are
created, you can aggregate the data and plot weight change over time.</p>
<h2>Implementation</h2>
<p>The <code>Weight Tracker</code> note in the screenshot above is of the type <code>Render Note</code>.
That type of note doesn't have any useful content itself. Instead it is
a placeholder where a <a href="#root/_help_CdNpE2pqjmI6">script</a> can render
its output.</p>
<p>Scripts for <code>Render Notes</code> are defined in a <a href="#root/_help_zEY4DaJG4YT5">relation</a> called <code>~renderNote</code>.
In this example, it's the <code>Weight Tracker</code>'s child <code>Implementation</code>.
The Implementation consists of two <a href="#root/_help_6f9hih2hXXZk">code notes</a> that
contain some HTML and JavaScript respectively, which load all the notes
with a <code>weight</code> attribute and display their values in a chart.</p>
<p>To actually render the chart, we're using a third party library called
<a
href="https://www.chartjs.org/">chart.js</a>which is imported as an attachment, since it's not built into
Trilium.</p>
<h3>Code</h3>
<p>Here's the content of the script which is placed in a <a href="#root/_help_6f9hih2hXXZk">code note</a> of
type <code>JS Frontend</code>:</p><pre><code class="language-text-x-trilium-auto">async function getChartData() {
const days = await api.runOnBackend(async () =&gt; {
const notes = api.getNotesWithLabel('weight');
const days = [];
@@ -82,12 +67,7 @@ new chartjs.Chart(ctx, {
type: 'line',
data: await getChartData()
});</code></pre>
<h2>How to remove the Weight Tracker button from the top bar</h2>
<p>In the link map of the <code>Weight Tracker</code>, there is a note called <code>Button</code>.
Open it and delete or comment out its contents. The <code>Weight Tracker</code> button
will disappear after you restart Trilium.</p>
</div>
</div>
</body>
</html>
<h2>How to remove the Weight Tracker button from the top bar</h2>
<p>In the link map of the <code>Weight Tracker</code>, there is a note called <code>Button</code>.
Open it and delete or comment out its contents. The <code>Weight Tracker</code> button
will disappear after you restart Trilium.</p>

View File

@@ -1,64 +1,44 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../style.css">
<base target="_parent">
<title data-trilium-title>Attributes</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Attributes</h1>
<div class="ck-content">
<figure class="image">
<img style="aspect-ratio:1071/146;" src="Attributes_image.png" width="1071"
height="146">
</figure>
<p>In Trilium, attributes are key-value pairs assigned to notes, providing
additional metadata or functionality. There are two primary types of attributes:</p>
<ol>
<li>
<p><a class="reference-link" href="#root/_help_HI6GBBIduIgv">Labels</a>&nbsp;can
be used for a variety of purposes, such as storing metadata or configuring
the behaviour of notes. Labels are also searchable, enhancing note retrieval.</p>
<p>For more information, including predefined labels, see&nbsp;<a class="reference-link"
href="#root/_help_HI6GBBIduIgv">Labels</a>.</p>
</li>
<li>
<p><a class="reference-link" href="#root/_help_Cq5X6iKQop6R">Relations</a>&nbsp;define
connections between notes, similar to links. These can be used for metadata
and scripting purposes.</p>
<p>For more information, including a list of predefined relations, see&nbsp;
<a
class="reference-link" href="#root/_help_Cq5X6iKQop6R">Relations</a>.</p>
</li>
</ol>
<p>These attributes play a crucial role in organizing, categorising, and
enhancing the functionality of notes.</p>
<h2>Viewing the list of attributes</h2>
<p>Both the labels and relations for the current note are displayed in the <em>Owned Attributes</em> section
of the&nbsp;<a class="reference-link" href="#root/_help_BlN9DFI679QC">Ribbon</a>,
where they can be viewed and edited. Inherited attributes are displayed
in the <em>Inherited Attributes</em> section of the ribbon, where they can
only be viewed.</p>
<p>In the list of attributes, labels are prefixed with the <code>#</code> character
whereas relations are prefixed with the <code>~</code> character.</p>
<h2>Multiplicity</h2>
<p>Attributes in Trilium can be "multi-valued", meaning multiple attributes
with the same name can co-exist.</p>
<h2>Attribute Definitions and Promoted Attributes</h2>
<p>Special labels create "label/attribute" definitions, enhancing the organization
and management of attributes. For more details, see&nbsp;<a class="reference-link"
href="#root/_help_OFXdgB2nNk1F">Promoted Attributes</a>.</p>
<h2>Attribute Inheritance</h2>
<p>Trilium supports attribute inheritance, allowing child notes to inherit
attributes from their parents. For more information, see&nbsp;<a class="reference-link"
href="#root/_help_bwZpz2ajCEwO">Attribute Inheritance</a>.</p>
</div>
</div>
</body>
</html>
<figure class="image">
<img style="aspect-ratio:1071/146;" src="Attributes_image.png" width="1071"
height="146">
</figure>
<p>In Trilium, attributes are key-value pairs assigned to notes, providing
additional metadata or functionality. There are two primary types of attributes:</p>
<ol>
<li>
<p><a class="reference-link" href="#root/_help_HI6GBBIduIgv">Labels</a>&nbsp;can
be used for a variety of purposes, such as storing metadata or configuring
the behaviour of notes. Labels are also searchable, enhancing note retrieval.</p>
<p>For more information, including predefined labels, see&nbsp;<a class="reference-link"
href="#root/_help_HI6GBBIduIgv">Labels</a>.</p>
</li>
<li>
<p><a class="reference-link" href="#root/_help_Cq5X6iKQop6R">Relations</a>&nbsp;define
connections between notes, similar to links. These can be used for metadata
and scripting purposes.</p>
<p>For more information, including a list of predefined relations, see&nbsp;
<a
class="reference-link" href="#root/_help_Cq5X6iKQop6R">Relations</a>.</p>
</li>
</ol>
<p>These attributes play a crucial role in organizing, categorising, and
enhancing the functionality of notes.</p>
<h2>Viewing the list of attributes</h2>
<p>Both the labels and relations for the current note are displayed in the <em>Owned Attributes</em> section
of the&nbsp;<a class="reference-link" href="#root/_help_BlN9DFI679QC">Ribbon</a>,
where they can be viewed and edited. Inherited attributes are displayed
in the <em>Inherited Attributes</em> section of the ribbon, where they can
only be viewed.</p>
<p>In the list of attributes, labels are prefixed with the <code>#</code> character
whereas relations are prefixed with the <code>~</code> character.</p>
<h2>Multiplicity</h2>
<p>Attributes in Trilium can be "multi-valued", meaning multiple attributes
with the same name can co-exist.</p>
<h2>Attribute Definitions and Promoted Attributes</h2>
<p>Special labels create "label/attribute" definitions, enhancing the organization
and management of attributes. For more details, see&nbsp;<a class="reference-link"
href="#root/_help_OFXdgB2nNk1F">Promoted Attributes</a>.</p>
<h2>Attribute Inheritance</h2>
<p>Trilium supports attribute inheritance, allowing child notes to inherit
attributes from their parents. For more information, see&nbsp;<a class="reference-link"
href="#root/_help_bwZpz2ajCEwO">Attribute Inheritance</a>.</p>

View File

@@ -1,70 +1,50 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../style.css">
<base target="_parent">
<title data-trilium-title>Attribute Inheritance</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Attribute Inheritance</h1>
<div class="ck-content">
<p>Inheritance refers to the process of having a <a href="#root/_help_HI6GBBIduIgv">label</a> or
a <a href="#root/_help_Cq5X6iKQop6R">relation</a> shared across multiple
notes, generally in parent-child relations (or anywhere if using templates).</p>
<h2>Standard Inheritance</h2>
<p>In Trilium, attributes can be automatically inherited by child notes if
they have the <code>isInheritable</code> flag set to <code>true</code>. This
means the attribute (a key-value pair) is applied to the note and all its
descendants.</p>
<p>To make an attribute inheritable, simply use the visual editor for&nbsp;
<a
class="reference-link" href="#root/_help_HI6GBBIduIgv">Labels</a>&nbsp;or&nbsp;<a class="reference-link" href="#root/_help_Cq5X6iKQop6R">Relations</a>.
Alternatively, the attribute can be manually defined where <code>#myLabel=value</code> becomes <code>#myLabel(inheritable)=value</code> when
inheritable.</p>
<p>As an example, the <code>archived</code> label can be set to be inheritable,
allowing you to hide a whole subtree of notes from searches and other dialogs
by applying this label at the top level.</p>
<p>Standard inheritance forces all the notes that are children (and sub-children)
of a note to have that particular label or relation. If there is a need
to have some notes not inherit one of the labels, then <em>copying inheritance</em> or <em>template inheritance</em> needs
to be used instead.</p>
<h2>Copying Inheritance</h2>
<p>Copying inheritance differs from standard inheritance by using a <code>child:</code> prefix
in the attribute name. This prefix causes new child notes to automatically
receive specific attributes from the parent note. These attributes are
independent of the parent and will persist even if the note is moved elsewhere.</p>
<p>If a parent note has the label <code>#child:exampleAttribute</code>, all
newly created child notes (one level deep) will inherit the <code>#exampleAttribute</code> label.
This can be useful for setting default properties for notes in a specific
section.</p>
<p>Similarly, for relations use <code>~child:myRelation</code>.</p>
<p>Due to the way it's designed, copying inheritance cannot be used to cascade
infinitely within a hierarchy. For that use case, consider using either
standard inheritance or templates.</p>
<h3>Chained inheritance</h3>
<p>It is possible to define labels across multiple levels of depth. For example, <code>#child:child:child:foo</code> applied
to a root note would create:</p>
<ul>
<li><code>#child:child:foo</code> on the first-level children.</li>
<li><code>#child:foo</code> on the second-level children.</li>
<li><code>#foo</code> on the third-level children.</li>
</ul>
<p>Similarly, use <code>~child:child:child:foo</code> if dealing with relations.</p>
<p>Do note that same as simple copying inheritance, the changes will not
apply retroactively to existing notes in the hierarchy, it will only apply
to the newly created notes.</p>
<h2>Template Inheritance</h2>
<p>Attributes can also be inherited from&nbsp;<a class="reference-link" href="#root/_help_KC1HB96bqqHX">Templates</a>.
When a new note is created using a template, it inherits the attributes
defined in that template. This is particularly useful for maintaining consistency
across notes that follow a similar structure or function.</p>
</div>
</div>
</body>
</html>
<p>Inheritance refers to the process of having a <a href="#root/_help_HI6GBBIduIgv">label</a> or
a <a href="#root/_help_Cq5X6iKQop6R">relation</a> shared across multiple
notes, generally in parent-child relations (or anywhere if using templates).</p>
<h2>Standard Inheritance</h2>
<p>In Trilium, attributes can be automatically inherited by child notes if
they have the <code>isInheritable</code> flag set to <code>true</code>. This
means the attribute (a key-value pair) is applied to the note and all its
descendants.</p>
<p>To make an attribute inheritable, simply use the visual editor for&nbsp;
<a
class="reference-link" href="#root/_help_HI6GBBIduIgv">Labels</a>&nbsp;or&nbsp;<a class="reference-link" href="#root/_help_Cq5X6iKQop6R">Relations</a>.
Alternatively, the attribute can be manually defined where <code>#myLabel=value</code> becomes <code>#myLabel(inheritable)=value</code> when
inheritable.</p>
<p>As an example, the <code>archived</code> label can be set to be inheritable,
allowing you to hide a whole subtree of notes from searches and other dialogs
by applying this label at the top level.</p>
<p>Standard inheritance forces all the notes that are children (and sub-children)
of a note to have that particular label or relation. If there is a need
to have some notes not inherit one of the labels, then <em>copying inheritance</em> or <em>template inheritance</em> needs
to be used instead.</p>
<h2>Copying Inheritance</h2>
<p>Copying inheritance differs from standard inheritance by using a <code>child:</code> prefix
in the attribute name. This prefix causes new child notes to automatically
receive specific attributes from the parent note. These attributes are
independent of the parent and will persist even if the note is moved elsewhere.</p>
<p>If a parent note has the label <code>#child:exampleAttribute</code>, all
newly created child notes (one level deep) will inherit the <code>#exampleAttribute</code> label.
This can be useful for setting default properties for notes in a specific
section.</p>
<p>Similarly, for relations use <code>~child:myRelation</code>.</p>
<p>Due to the way it's designed, copying inheritance cannot be used to cascade
infinitely within a hierarchy. For that use case, consider using either
standard inheritance or templates.</p>
<h3>Chained inheritance</h3>
<p>It is possible to define labels across multiple levels of depth. For example, <code>#child:child:child:foo</code> applied
to a root note would create:</p>
<ul>
<li><code>#child:child:foo</code> on the first-level children.</li>
<li><code>#child:foo</code> on the second-level children.</li>
<li><code>#foo</code> on the third-level children.</li>
</ul>
<p>Similarly, use <code>~child:child:child:foo</code> if dealing with relations.</p>
<p>Do note that same as simple copying inheritance, the changes will not
apply retroactively to existing notes in the hierarchy, it will only apply
to the newly created notes.</p>
<h2>Template Inheritance</h2>
<p>Attributes can also be inherited from&nbsp;<a class="reference-link" href="#root/_help_KC1HB96bqqHX">Templates</a>.
When a new note is created using a template, it inherits the attributes
defined in that template. This is particularly useful for maintaining consistency
across notes that follow a similar structure or function.</p>

View File

@@ -1,405 +1,385 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../style.css">
<base target="_parent">
<title data-trilium-title>Labels</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Labels</h1>
<div class="ck-content">
<p>A label is an <a href="#root/_help_zEY4DaJG4YT5">attribute</a> of a note
which has a name and optionally a value.</p>
<h2>Common use cases</h2>
<ul>
<li><strong>Metadata for personal use</strong>: Assign labels with optional
values for categorization, such as <code>#year=1999</code>, <code>#genre="sci-fi"</code>,
or <code>#author="Neal Stephenson"</code>. This can be combined with&nbsp;
<a
class="reference-link" href="#root/_help_OFXdgB2nNk1F">Promoted Attributes</a>&nbsp;to make their display more user-friendly.</li>
<li><strong>Configuration</strong>: Labels can configure advanced features
or settings (see reference below).</li>
<li><strong>Scripts and Plugins</strong>: Used to tag notes with special metadata,
such as the "weight" attribute in the&nbsp;<a class="reference-link" href="#root/_help_R7abl2fc6Mxi">Weight Tracker</a>.</li>
</ul>
<h2>Creating a label using the visual editor</h2>
<ol>
<li>Go to the <em>Owned Attributes</em> section in the&nbsp;<a class="reference-link"
href="#root/_help_BlN9DFI679QC">Ribbon</a>.</li>
<li>Press the + button (<em>Add new attribute</em>) to the right.</li>
<li>Select <em>Add new label</em> for the relation.</li>
</ol>
<aside class="admonition tip">
<p>If you prefer keyboard shortcuts, press <kbd>Alt</kbd>+<kbd>L</kbd> while
focused on a note or in the <em>Owned Attributes</em> section to display
the visual editor.</p>
</aside>
<p>While in the visual editor:</p>
<ul>
<li>Set the desired name</li>
<li>Optionally, set the value of the label. Labels can exist without a value.</li>
<li>Check <em>Inheritable</em> if the label should be inherited by the child
notes as well. See&nbsp;<a class="reference-link" href="#root/_help_bwZpz2ajCEwO">Attribute Inheritance</a>&nbsp;for
more information.</li>
</ul>
<h2>Creating a label manually</h2>
<p>In the <em>Owned Attributes</em> section in the&nbsp;<a class="reference-link"
href="#root/_help_BlN9DFI679QC">Ribbon</a>:</p>
<ul>
<li>To create a label called <code>myLabel</code> with no value, simply type <code>#myLabel</code>.</li>
<li>To create a label called <code>myLabel</code> with a value <code>value</code>,
simply type <code>#myLabel=value</code>.</li>
<li>If the value contains spaces, then the text must be quoted: <code>#myLabel="Hello world"</code>.</li>
<li>If the string contains quotes (regardless of whether it has spaces), then
the text must be quoted with apostrophes instead: <code>#myLabel='Hello "world"'</code>.</li>
<li>To create an inheritable label called <code>myLabel</code>, simply write <code>#myLabel(inheritable)</code> for
no value or <code>#myLabel(inheritable)=value</code> if there is a value.</li>
</ul>
<h2>Predefined labels</h2>
<p>This is a list of labels that Trilium natively supports.</p>
<aside class="admonition tip">
<p>Some labels presented here end with a <code>*</code>. That means that there
are multiple labels with the same prefix, consult the specific page linked
in the description of that label for more information.</p>
</aside>
<figure class="table" style="width:100%;">
<table class="ck-table-resized">
<colgroup>
<col style="width:33.82%;">
<col style="width:66.18%;">
</colgroup>
<thead>
<tr>
<th>Label</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>disableVersioning</code>
</td>
<td>Disables automatic creation of&nbsp;<a class="reference-link" href="#root/_help_vZWERwf8U3nx">Note Revisions</a>&nbsp;for
a particular note. Useful for e.g. large, but unimportant notes - e.g.
large JS libraries used for scripting.</td>
</tr>
<tr>
<td><code>versioningLimit</code>
</td>
<td>Limits the maximum number of&nbsp;<a class="reference-link" href="#root/_help_vZWERwf8U3nx">Note Revisions</a>&nbsp;for
a particular note, overriding the global settings.</td>
</tr>
<tr>
<td><code>calendarRoot</code>
</td>
<td>Marks the note which should be used as root for&nbsp;<a class="reference-link"
href="#root/_help_l0tKav7yLHGF">Day Notes</a>. Only one should be marked
as such.</td>
</tr>
<tr>
<td><code>archived</code>
</td>
<td>Hides notes from default search results and dialogs. Archived notes can
optionally be hidden in the&nbsp;<a class="reference-link" href="#root/_help_oPVyFC7WL2Lp">Note Tree</a>.</td>
</tr>
<tr>
<td><code>excludeFromExport</code>
</td>
<td>Excludes this note and its children when exporting.</td>
</tr>
<tr>
<td><code>run</code>, <code>runOnInstance</code>, <code>runAtHour</code>
</td>
<td>See&nbsp;<a class="reference-link" href="#root/_help_GPERMystNGTB">Events</a>.</td>
</tr>
<tr>
<td><code>disableInclusion</code>
</td>
<td>Scripts with this label won't be included into parent script execution.</td>
</tr>
<tr>
<td><code>sorted</code>
</td>
<td>
<p>Keeps child notes sorted by title alphabetically.</p>
<p>When given a value, it will sort by the value of another label instead.
If one of the child notes doesn't have the specified label, the title will
be used for them instead.</p>
</td>
</tr>
<tr>
<td><code>sortDirection</code>
</td>
<td>
<p>If <code>sorted</code> is applied, specifies the direction of the sort:</p>
<ul>
<li><code>ASC</code>, ascending (default)</li>
<li><code>DESC</code>, descending</li>
</ul>
</td>
</tr>
<tr>
<td><code>sortFoldersFirst</code>
</td>
<td>If <code>sorted</code> is applied, folders (notes with children) will be
sorted as a group at the top, and the rest will be sorted.</td>
</tr>
<tr>
<td><code>top</code>
</td>
<td>If <code>sorted</code> is applied to the parent note, keeps given note on
top in its parent.</td>
</tr>
<tr>
<td><code>hidePromotedAttributes</code>
</td>
<td>Hide&nbsp;<a class="reference-link" href="#root/_help_OFXdgB2nNk1F">Promoted Attributes</a>&nbsp;on
this note. Generally useful when defining inherited attributes, but the
parent note doesn't need them.</td>
</tr>
<tr>
<td><code>readOnly</code>
</td>
<td>Marks a note to be always be <a href="#root/_help_CoFPLs3dRlXc">read-only</a>,
if it's a supported note (text, code, mermaid).</td>
</tr>
<tr>
<td><code>autoReadOnlyDisabled</code>
</td>
<td>Disables automatic <a href="#root/_help_CoFPLs3dRlXc">read-only mode</a> for
the given note.</td>
</tr>
<tr>
<td><code>appCss</code>
</td>
<td>Marks CSS notes which are loaded into the Trilium application and can
thus be used to modify Trilium's looks. See&nbsp;<a class="reference-link"
href="#root/_help_AlhDUqhENtH7">Custom app-wide CSS</a>&nbsp;for more info.</td>
</tr>
<tr>
<td><code>appTheme</code>
</td>
<td>Marks CSS notes which are full Trilium themes and are thus available in
Trilium options. See&nbsp;<a class="reference-link" href="#root/_help_pKK96zzmvBGf">Theme development</a>&nbsp;for
more information.</td>
</tr>
<tr>
<td><code>appThemeBase</code>
</td>
<td>Set to <code>next</code>, <code>next-light</code>, or <code>next-dark</code> to
use the corresponding TriliumNext theme (auto, light or dark) as the base
for a custom theme, instead of the legacy one. See&nbsp;<a class="reference-link"
href="#root/_help_WFGzWeUK6arS">Customize the Next theme</a>&nbsp;for more
information.</td>
</tr>
<tr>
<td><code>cssClass</code>
</td>
<td>Value of this label is then added as CSS class to the node representing
given note in the&nbsp;<a class="reference-link" href="#root/_help_oPVyFC7WL2Lp">Note Tree</a>.
This can be useful for advanced theming. Can be used in template notes.</td>
</tr>
<tr>
<td><code>iconClass</code>
</td>
<td>value of this label is added as a CSS class to the icon on the tree which
can help visually distinguish the notes in the tree. Example might be bx
bx-home - icons are taken from boxicons. Can be used in template notes.</td>
</tr>
<tr>
<td><code>pageSize</code>
</td>
<td>Specifies the number of items per page in&nbsp;<a class="reference-link"
href="#root/_help_0ESUbbAxVnoK">Note List</a>.</td>
</tr>
<tr>
<td><code>customRequestHandler</code>
</td>
<td>See&nbsp;<a class="reference-link" href="#root/_help_J5Ex1ZrMbyJ6">Custom Request Handler</a>.</td>
</tr>
<tr>
<td><code>customResourceProvider</code>
</td>
<td>See&nbsp;<a class="reference-link" href="#root/_help_d3fAXQ2diepH">Custom Resource Providers</a>.</td>
</tr>
<tr>
<td><code>widget</code>
</td>
<td>Marks this note as a custom widget which will be added to the Trilium
component tree. See&nbsp;<a class="reference-link" href="#root/_help_MgibgPcfeuGz">Custom Widgets</a>&nbsp;for
more information.</td>
</tr>
<tr>
<td><code>searchHome</code>
</td>
<td>New search notes will be created as children of this note (see&nbsp;
<a
class="reference-link" href="#root/_help_m523cpzocqaD">Saved Search</a>).</td>
</tr>
<tr>
<td><code>workspace</code> and related attributes</td>
<td>See&nbsp;<a class="reference-link" href="#root/_help_9sRHySam5fXb">Workspaces</a>.</td>
</tr>
<tr>
<td><code>inbox</code>
</td>
<td>default inbox location for new notes - when you create a note using <em>new note</em> button
in the sidebar, notes will be created as child notes in the note marked
as with <code>#inbox</code> label.</td>
</tr>
<tr>
<td><code>sqlConsoleHome</code>
</td>
<td>Default location of&nbsp;<a class="reference-link" href="#root/_hidden/_help/_help_tC7s2alapj8V/_help_wX4HbRucYSDD/_help_oyIAJ9PvvwHX/_help__help_YKWqdJhzi2VY">SQL Console</a>&nbsp;notes</td>
</tr>
<tr>
<td><code>bookmarked</code>
</td>
<td>Indicates this note is a <a href="#root/_help_u3YFHC9tQlpm">bookmark</a>.</td>
</tr>
<tr>
<td><code>bookmarkFolder</code>
</td>
<td>Note with this label will appear in bookmarks as folder (allowing access
to its children). See&nbsp;<a class="reference-link" href="#root/_help_u3YFHC9tQlpm">Bookmarks</a>&nbsp;for
more information.</td>
</tr>
<tr>
<td><code>share*</code>
</td>
<td>See the attribute reference in&nbsp;<a class="reference-link" href="#root/_help_R9pX4DGra2Vt">Sharing</a>.</td>
</tr>
<tr>
<td><code>displayRelations</code>, <code>hideRelations</code>
</td>
<td>Comma delimited names of relations which should be displayed/hidden in
a&nbsp;<a class="reference-link" href="#root/_help_iRwzGnHPzonm">Relation Map</a>&nbsp;(both
the note type and the&nbsp;<a class="reference-link" href="#root/_help_BCkXAVs63Ttv">Note Map (Link map, Tree map)</a>&nbsp;general
functionality).</td>
</tr>
<tr>
<td><code>titleTemplate</code>
</td>
<td>
<p>Default title of notes created as children of this note. This value is
evaluated as a JavaScript string and thus can be enriched with dynamic
content via the injected <code>now</code> and <code>parentNote</code> variables.</p>
<p>Examples:</p>
<ul>
<li><code>${parentNote.getLabel('authorName')}'s literary works</code>
</li>
<li><code>Log for ${now.format('YYYY-MM-DD HH:mm:ss')}</code>
</li>
<li>to mirror the parent's template.</li>
</ul>
<p>See&nbsp;<a class="reference-link" href="#root/_help_47ZrP6FNuoG8">Default Note Title</a>&nbsp;for
more info.</p>
</td>
</tr>
<tr>
<td><code>template</code>
</td>
<td>This note will appear in the selection of available template when creating
new note. See&nbsp;<a class="reference-link" href="#root/_help_KC1HB96bqqHX">Templates</a>&nbsp;for
more information.</td>
</tr>
<tr>
<td><code>toc</code>
</td>
<td>Controls the display of the&nbsp;<a class="reference-link" href="#root/_help_BFvAtE74rbP6">Table of contents</a>&nbsp;for
a given note. <code>#toc</code> or <code>#toc=show</code> to always display
the table of contents, <code>#toc=false</code> to always hide it.</td>
</tr>
<tr>
<td><code>color</code>
</td>
<td>defines color of the note in note tree, links etc. Use any valid CSS color
value like 'red' or #a13d5f</td>
</tr>
<tr>
<td><code>keyboardShortcut</code>
</td>
<td>Defines a keyboard shortcut which will immediately jump to this note.
Example: 'ctrl+alt+e'. Requires frontend reload for the change to take
effect.</td>
</tr>
<tr>
<td><code>keepCurrentHoisting</code>
</td>
<td>Opening this link won't change hoisting even if the note is not displayable
in the current hoisted subtree.</td>
</tr>
<tr>
<td><code>executeButton</code>
</td>
<td>Title of the button which will execute the current code note</td>
</tr>
<tr>
<td><code>executeDescription</code>
</td>
<td>Longer description of the current code note displayed together with the
execute button</td>
</tr>
<tr>
<td><code>excludeFromNoteMap</code>
</td>
<td>Notes with this label will be hidden from the&nbsp;<a class="reference-link"
href="#root/_help_bdUJEHsAPYQR">Note Map</a>.</td>
</tr>
<tr>
<td><code>newNotesOnTop</code>
</td>
<td>New notes will be created at the top of the parent note, not on the bottom.</td>
</tr>
<tr>
<td><code>hideHighlightWidget</code>
</td>
<td>Hides the&nbsp;<a class="reference-link" href="#root/_help_AxshuNRegLAv">Highlights list</a>&nbsp;widget</td>
</tr>
<tr>
<td><code>hideChildrenOverview</code>
</td>
<td>Hides the&nbsp;<a class="reference-link" href="#root/_help_0ESUbbAxVnoK">Note List</a>&nbsp;for
that particular note.</td>
</tr>
<tr>
<td><code>printLandscape</code>
</td>
<td>When exporting to PDF, changes the orientation of the page to landscape
instead of portrait.</td>
</tr>
<tr>
<td><code>printPageSize</code>
</td>
<td>When exporting to PDF, changes the size of the page. Supported values: <code>A0</code>, <code>A1</code>, <code>A2</code>, <code>A3</code>, <code>A4</code>, <code>A5</code>, <code>A6</code>, <code>Legal</code>, <code>Letter</code>, <code>Tabloid</code>, <code>Ledger</code>.</td>
</tr>
<tr>
<td><code>geolocation</code>
</td>
<td>Indicates the latitude and longitude of a note, to be displayed in a&nbsp;
<a
class="reference-link" href="#root/_help_81SGnPGMk7Xc">Geo Map</a>.</td>
</tr>
<tr>
<td><code>calendar:*</code>
</td>
<td>Defines specific options for the&nbsp;<a class="reference-link" href="#root/_help_xWbu3jpNWapp">Calendar View</a>.</td>
</tr>
<tr>
<td><code>viewType</code>
</td>
<td>Sets the view of child notes (e.g. grid or list). See&nbsp;<a class="reference-link"
href="#root/_help_0ESUbbAxVnoK">Note List</a>&nbsp;for more information.</td>
</tr>
</tbody>
</table>
</figure>
</div>
</div>
</body>
</html>
<p>A label is an <a href="#root/_help_zEY4DaJG4YT5">attribute</a> of a note
which has a name and optionally a value.</p>
<h2>Common use cases</h2>
<ul>
<li><strong>Metadata for personal use</strong>: Assign labels with optional
values for categorization, such as <code>#year=1999</code>, <code>#genre="sci-fi"</code>,
or <code>#author="Neal Stephenson"</code>. This can be combined with&nbsp;
<a
class="reference-link" href="#root/_help_OFXdgB2nNk1F">Promoted Attributes</a>&nbsp;to make their display more user-friendly.</li>
<li><strong>Configuration</strong>: Labels can configure advanced features
or settings (see reference below).</li>
<li><strong>Scripts and Plugins</strong>: Used to tag notes with special metadata,
such as the "weight" attribute in the&nbsp;<a class="reference-link" href="#root/_help_R7abl2fc6Mxi">Weight Tracker</a>.</li>
</ul>
<h2>Creating a label using the visual editor</h2>
<ol>
<li>Go to the <em>Owned Attributes</em> section in the&nbsp;<a class="reference-link"
href="#root/_help_BlN9DFI679QC">Ribbon</a>.</li>
<li>Press the + button (<em>Add new attribute</em>) to the right.</li>
<li>Select <em>Add new label</em> for the relation.</li>
</ol>
<aside class="admonition tip">
<p>If you prefer keyboard shortcuts, press <kbd>Alt</kbd>+<kbd>L</kbd> while
focused on a note or in the <em>Owned Attributes</em> section to display
the visual editor.</p>
</aside>
<p>While in the visual editor:</p>
<ul>
<li>Set the desired name</li>
<li>Optionally, set the value of the label. Labels can exist without a value.</li>
<li>Check <em>Inheritable</em> if the label should be inherited by the child
notes as well. See&nbsp;<a class="reference-link" href="#root/_help_bwZpz2ajCEwO">Attribute Inheritance</a>&nbsp;for
more information.</li>
</ul>
<h2>Creating a label manually</h2>
<p>In the <em>Owned Attributes</em> section in the&nbsp;<a class="reference-link"
href="#root/_help_BlN9DFI679QC">Ribbon</a>:</p>
<ul>
<li>To create a label called <code>myLabel</code> with no value, simply type <code>#myLabel</code>.</li>
<li>To create a label called <code>myLabel</code> with a value <code>value</code>,
simply type <code>#myLabel=value</code>.</li>
<li>If the value contains spaces, then the text must be quoted: <code>#myLabel="Hello world"</code>.</li>
<li>If the string contains quotes (regardless of whether it has spaces), then
the text must be quoted with apostrophes instead: <code>#myLabel='Hello "world"'</code>.</li>
<li>To create an inheritable label called <code>myLabel</code>, simply write <code>#myLabel(inheritable)</code> for
no value or <code>#myLabel(inheritable)=value</code> if there is a value.</li>
</ul>
<h2>Predefined labels</h2>
<p>This is a list of labels that Trilium natively supports.</p>
<aside class="admonition tip">
<p>Some labels presented here end with a <code>*</code>. That means that there
are multiple labels with the same prefix, consult the specific page linked
in the description of that label for more information.</p>
</aside>
<figure class="table" style="width:100%;">
<table class="ck-table-resized">
<colgroup>
<col style="width:33.82%;">
<col style="width:66.18%;">
</colgroup>
<thead>
<tr>
<th>Label</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>disableVersioning</code>
</td>
<td>Disables automatic creation of&nbsp;<a class="reference-link" href="#root/_help_vZWERwf8U3nx">Note Revisions</a>&nbsp;for
a particular note. Useful for e.g. large, but unimportant notes - e.g.
large JS libraries used for scripting.</td>
</tr>
<tr>
<td><code>versioningLimit</code>
</td>
<td>Limits the maximum number of&nbsp;<a class="reference-link" href="#root/_help_vZWERwf8U3nx">Note Revisions</a>&nbsp;for
a particular note, overriding the global settings.</td>
</tr>
<tr>
<td><code>calendarRoot</code>
</td>
<td>Marks the note which should be used as root for&nbsp;<a class="reference-link"
href="#root/_help_l0tKav7yLHGF">Day Notes</a>. Only one should be marked
as such.</td>
</tr>
<tr>
<td><code>archived</code>
</td>
<td>Hides notes from default search results and dialogs. Archived notes can
optionally be hidden in the&nbsp;<a class="reference-link" href="#root/_help_oPVyFC7WL2Lp">Note Tree</a>.</td>
</tr>
<tr>
<td><code>excludeFromExport</code>
</td>
<td>Excludes this note and its children when exporting.</td>
</tr>
<tr>
<td><code>run</code>, <code>runOnInstance</code>, <code>runAtHour</code>
</td>
<td>See&nbsp;<a class="reference-link" href="#root/_help_GPERMystNGTB">Events</a>.</td>
</tr>
<tr>
<td><code>disableInclusion</code>
</td>
<td>Scripts with this label won't be included into parent script execution.</td>
</tr>
<tr>
<td><code>sorted</code>
</td>
<td>
<p>Keeps child notes sorted by title alphabetically.</p>
<p>When given a value, it will sort by the value of another label instead.
If one of the child notes doesn't have the specified label, the title will
be used for them instead.</p>
</td>
</tr>
<tr>
<td><code>sortDirection</code>
</td>
<td>
<p>If <code>sorted</code> is applied, specifies the direction of the sort:</p>
<ul>
<li><code>ASC</code>, ascending (default)</li>
<li><code>DESC</code>, descending</li>
</ul>
</td>
</tr>
<tr>
<td><code>sortFoldersFirst</code>
</td>
<td>If <code>sorted</code> is applied, folders (notes with children) will be
sorted as a group at the top, and the rest will be sorted.</td>
</tr>
<tr>
<td><code>top</code>
</td>
<td>If <code>sorted</code> is applied to the parent note, keeps given note on
top in its parent.</td>
</tr>
<tr>
<td><code>hidePromotedAttributes</code>
</td>
<td>Hide&nbsp;<a class="reference-link" href="#root/_help_OFXdgB2nNk1F">Promoted Attributes</a>&nbsp;on
this note. Generally useful when defining inherited attributes, but the
parent note doesn't need them.</td>
</tr>
<tr>
<td><code>readOnly</code>
</td>
<td>Marks a note to be always be <a href="#root/_help_CoFPLs3dRlXc">read-only</a>,
if it's a supported note (text, code, mermaid).</td>
</tr>
<tr>
<td><code>autoReadOnlyDisabled</code>
</td>
<td>Disables automatic <a href="#root/_help_CoFPLs3dRlXc">read-only mode</a> for
the given note.</td>
</tr>
<tr>
<td><code>appCss</code>
</td>
<td>Marks CSS notes which are loaded into the Trilium application and can
thus be used to modify Trilium's looks. See&nbsp;<a class="reference-link"
href="#root/_help_AlhDUqhENtH7">Custom app-wide CSS</a>&nbsp;for more info.</td>
</tr>
<tr>
<td><code>appTheme</code>
</td>
<td>Marks CSS notes which are full Trilium themes and are thus available in
Trilium options. See&nbsp;<a class="reference-link" href="#root/_help_pKK96zzmvBGf">Theme development</a>&nbsp;for
more information.</td>
</tr>
<tr>
<td><code>appThemeBase</code>
</td>
<td>Set to <code>next</code>, <code>next-light</code>, or <code>next-dark</code> to
use the corresponding TriliumNext theme (auto, light or dark) as the base
for a custom theme, instead of the legacy one. See&nbsp;<a class="reference-link"
href="#root/_help_WFGzWeUK6arS">Customize the Next theme</a>&nbsp;for more
information.</td>
</tr>
<tr>
<td><code>cssClass</code>
</td>
<td>Value of this label is then added as CSS class to the node representing
given note in the&nbsp;<a class="reference-link" href="#root/_help_oPVyFC7WL2Lp">Note Tree</a>.
This can be useful for advanced theming. Can be used in template notes.</td>
</tr>
<tr>
<td><code>iconClass</code>
</td>
<td>value of this label is added as a CSS class to the icon on the tree which
can help visually distinguish the notes in the tree. Example might be bx
bx-home - icons are taken from boxicons. Can be used in template notes.</td>
</tr>
<tr>
<td><code>pageSize</code>
</td>
<td>Specifies the number of items per page in&nbsp;<a class="reference-link"
href="#root/_help_0ESUbbAxVnoK">Note List</a>.</td>
</tr>
<tr>
<td><code>customRequestHandler</code>
</td>
<td>See&nbsp;<a class="reference-link" href="#root/_help_J5Ex1ZrMbyJ6">Custom Request Handler</a>.</td>
</tr>
<tr>
<td><code>customResourceProvider</code>
</td>
<td>See&nbsp;<a class="reference-link" href="#root/_help_d3fAXQ2diepH">Custom Resource Providers</a>.</td>
</tr>
<tr>
<td><code>widget</code>
</td>
<td>Marks this note as a custom widget which will be added to the Trilium
component tree. See&nbsp;<a class="reference-link" href="#root/_help_MgibgPcfeuGz">Custom Widgets</a>&nbsp;for
more information.</td>
</tr>
<tr>
<td><code>searchHome</code>
</td>
<td>New search notes will be created as children of this note (see&nbsp;
<a
class="reference-link" href="#root/_help_m523cpzocqaD">Saved Search</a>).</td>
</tr>
<tr>
<td><code>workspace</code> and related attributes</td>
<td>See&nbsp;<a class="reference-link" href="#root/_help_9sRHySam5fXb">Workspaces</a>.</td>
</tr>
<tr>
<td><code>inbox</code>
</td>
<td>default inbox location for new notes - when you create a note using <em>new note</em> button
in the sidebar, notes will be created as child notes in the note marked
as with <code>#inbox</code> label.</td>
</tr>
<tr>
<td><code>sqlConsoleHome</code>
</td>
<td>Default location of&nbsp;<a class="reference-link" href="#root/_hidden/_help/_help_tC7s2alapj8V/_help_wX4HbRucYSDD/_help_oyIAJ9PvvwHX/_help__help_YKWqdJhzi2VY">SQL Console</a>&nbsp;notes</td>
</tr>
<tr>
<td><code>bookmarked</code>
</td>
<td>Indicates this note is a <a href="#root/_help_u3YFHC9tQlpm">bookmark</a>.</td>
</tr>
<tr>
<td><code>bookmarkFolder</code>
</td>
<td>Note with this label will appear in bookmarks as folder (allowing access
to its children). See&nbsp;<a class="reference-link" href="#root/_help_u3YFHC9tQlpm">Bookmarks</a>&nbsp;for
more information.</td>
</tr>
<tr>
<td><code>share*</code>
</td>
<td>See the attribute reference in&nbsp;<a class="reference-link" href="#root/_help_R9pX4DGra2Vt">Sharing</a>.</td>
</tr>
<tr>
<td><code>displayRelations</code>, <code>hideRelations</code>
</td>
<td>Comma delimited names of relations which should be displayed/hidden in
a&nbsp;<a class="reference-link" href="#root/_help_iRwzGnHPzonm">Relation Map</a>&nbsp;(both
the note type and the&nbsp;<a class="reference-link" href="#root/_help_BCkXAVs63Ttv">Note Map (Link map, Tree map)</a>&nbsp;general
functionality).</td>
</tr>
<tr>
<td><code>titleTemplate</code>
</td>
<td>
<p>Default title of notes created as children of this note. This value is
evaluated as a JavaScript string and thus can be enriched with dynamic
content via the injected <code>now</code> and <code>parentNote</code> variables.</p>
<p>Examples:</p>
<ul>
<li><code>${parentNote.getLabel('authorName')}'s literary works</code>
</li>
<li><code>Log for ${now.format('YYYY-MM-DD HH:mm:ss')}</code>
</li>
<li>to mirror the parent's template.</li>
</ul>
<p>See&nbsp;<a class="reference-link" href="#root/_help_47ZrP6FNuoG8">Default Note Title</a>&nbsp;for
more info.</p>
</td>
</tr>
<tr>
<td><code>template</code>
</td>
<td>This note will appear in the selection of available template when creating
new note. See&nbsp;<a class="reference-link" href="#root/_help_KC1HB96bqqHX">Templates</a>&nbsp;for
more information.</td>
</tr>
<tr>
<td><code>toc</code>
</td>
<td>Controls the display of the&nbsp;<a class="reference-link" href="#root/_help_BFvAtE74rbP6">Table of contents</a>&nbsp;for
a given note. <code>#toc</code> or <code>#toc=show</code> to always display
the table of contents, <code>#toc=false</code> to always hide it.</td>
</tr>
<tr>
<td><code>color</code>
</td>
<td>defines color of the note in note tree, links etc. Use any valid CSS color
value like 'red' or #a13d5f</td>
</tr>
<tr>
<td><code>keyboardShortcut</code>
</td>
<td>Defines a keyboard shortcut which will immediately jump to this note.
Example: 'ctrl+alt+e'. Requires frontend reload for the change to take
effect.</td>
</tr>
<tr>
<td><code>keepCurrentHoisting</code>
</td>
<td>Opening this link won't change hoisting even if the note is not displayable
in the current hoisted subtree.</td>
</tr>
<tr>
<td><code>executeButton</code>
</td>
<td>Title of the button which will execute the current code note</td>
</tr>
<tr>
<td><code>executeDescription</code>
</td>
<td>Longer description of the current code note displayed together with the
execute button</td>
</tr>
<tr>
<td><code>excludeFromNoteMap</code>
</td>
<td>Notes with this label will be hidden from the&nbsp;<a class="reference-link"
href="#root/_help_bdUJEHsAPYQR">Note Map</a>.</td>
</tr>
<tr>
<td><code>newNotesOnTop</code>
</td>
<td>New notes will be created at the top of the parent note, not on the bottom.</td>
</tr>
<tr>
<td><code>hideHighlightWidget</code>
</td>
<td>Hides the&nbsp;<a class="reference-link" href="#root/_help_AxshuNRegLAv">Highlights list</a>&nbsp;widget</td>
</tr>
<tr>
<td><code>hideChildrenOverview</code>
</td>
<td>Hides the&nbsp;<a class="reference-link" href="#root/_help_0ESUbbAxVnoK">Note List</a>&nbsp;for
that particular note.</td>
</tr>
<tr>
<td><code>printLandscape</code>
</td>
<td>When exporting to PDF, changes the orientation of the page to landscape
instead of portrait.</td>
</tr>
<tr>
<td><code>printPageSize</code>
</td>
<td>When exporting to PDF, changes the size of the page. Supported values: <code>A0</code>, <code>A1</code>, <code>A2</code>, <code>A3</code>, <code>A4</code>, <code>A5</code>, <code>A6</code>, <code>Legal</code>, <code>Letter</code>, <code>Tabloid</code>, <code>Ledger</code>.</td>
</tr>
<tr>
<td><code>geolocation</code>
</td>
<td>Indicates the latitude and longitude of a note, to be displayed in a&nbsp;
<a
class="reference-link" href="#root/_help_81SGnPGMk7Xc">Geo Map</a>.</td>
</tr>
<tr>
<td><code>calendar:*</code>
</td>
<td>Defines specific options for the&nbsp;<a class="reference-link" href="#root/_help_xWbu3jpNWapp">Calendar View</a>.</td>
</tr>
<tr>
<td><code>viewType</code>
</td>
<td>Sets the view of child notes (e.g. grid or list). See&nbsp;<a class="reference-link"
href="#root/_help_0ESUbbAxVnoK">Note List</a>&nbsp;for more information.</td>
</tr>
</tbody>
</table>
</figure>

View File

@@ -1,69 +1,49 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../style.css">
<base target="_parent">
<title data-trilium-title>Promoted Attributes</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Promoted Attributes</h1>
<div class="ck-content">
<p>Promoted attributes are <a href="#root/_help_zEY4DaJG4YT5">attributes</a> which
are considered important and thus are "promoted" onto the main note UI.
See example below:</p>
<p>
<img src="Promoted Attributes_promot.png">
</p>
<p>You can see the note having kind of form with several fields. Each of
these is just regular attribute, the only difference is that they appear
on the note itself.</p>
<p>Attributes can be pretty useful since they allow for querying and script
automation etc. but they are also inconveniently hidden. This allows you
to select few of the important ones and push them to the front of the user.</p>
<p>Now, how do we make attribute to appear on the UI?</p>
<h2>Attribute definition</h2>
<p>Attribute is always name-value pair where both name and value are strings.</p>
<p><em>Attribute definition</em> specifies how should this value be interpreted
- is it just string, or is it a date? Should we allow multiple values or
note? And importantly, should we <em>promote</em> the attribute or not?</p>
<p>
<img src="Promoted Attributes_image.png">
</p>
<p>You can notice tag attribute definition. These "definition" attributes
define how the "value" attributes should behave.</p>
<p>So there's one attribute for value and one for definition. But notice
how definition attribute is <a href="#root/_help_bwZpz2ajCEwO">Inheritable</a>,
meaning that it's also applied to all descendant note. So in a way, this
definition is used for the whole subtree while "value" attributes are applied
only for this note.</p>
<h3>Inverse relation</h3>
<p>Some relations always occur in pairs - my favorite example is on the family.
If you have a note representing husband and note representing wife, then
there might be a relation between those two of <code>isPartnerOf</code>.
This is bidirectional relationship - meaning that if a relation is pointing
from husband to wife then there should be always another relation pointing
from wife to husband.</p>
<p>Another example is with parent - child relationship. Again these always
occur in pairs, but in this case it's not exact same relation - the one
going from parent to child might be called <code>isParentOf</code> and the
other one going from child to parent might be called <code>isChildOf</code>.</p>
<p>Relation definition allows you to specify such "inverse relation" - for
the relation you just define you specify which is the inverse relation.
Note that in the second example we should have two relation definitions
- one for <code>isParentOf</code> which defines <code>isChildOf</code> as inverse
relation and then second relation definition for <code>isChildOf</code> which
defines <code>isParentOf</code> as inverse relation.</p>
<p>What this does internally is that whenever we save a relation which has
defined inverse relation, we check that this inverse relation exists on
the relation target note. Similarly, when we delete relation, we also delete
inverse relation on the target note.</p>
</div>
</div>
</body>
</html>
<p>Promoted attributes are <a href="#root/_help_zEY4DaJG4YT5">attributes</a> which
are considered important and thus are "promoted" onto the main note UI.
See example below:</p>
<p>
<img src="Promoted Attributes_promot.png">
</p>
<p>You can see the note having kind of form with several fields. Each of
these is just regular attribute, the only difference is that they appear
on the note itself.</p>
<p>Attributes can be pretty useful since they allow for querying and script
automation etc. but they are also inconveniently hidden. This allows you
to select few of the important ones and push them to the front of the user.</p>
<p>Now, how do we make attribute to appear on the UI?</p>
<h2>Attribute definition</h2>
<p>Attribute is always name-value pair where both name and value are strings.</p>
<p><em>Attribute definition</em> specifies how should this value be interpreted
- is it just string, or is it a date? Should we allow multiple values or
note? And importantly, should we <em>promote</em> the attribute or not?</p>
<p>
<img src="Promoted Attributes_image.png">
</p>
<p>You can notice tag attribute definition. These "definition" attributes
define how the "value" attributes should behave.</p>
<p>So there's one attribute for value and one for definition. But notice
how definition attribute is <a href="#root/_help_bwZpz2ajCEwO">Inheritable</a>,
meaning that it's also applied to all descendant note. So in a way, this
definition is used for the whole subtree while "value" attributes are applied
only for this note.</p>
<h3>Inverse relation</h3>
<p>Some relations always occur in pairs - my favorite example is on the family.
If you have a note representing husband and note representing wife, then
there might be a relation between those two of <code>isPartnerOf</code>.
This is bidirectional relationship - meaning that if a relation is pointing
from husband to wife then there should be always another relation pointing
from wife to husband.</p>
<p>Another example is with parent - child relationship. Again these always
occur in pairs, but in this case it's not exact same relation - the one
going from parent to child might be called <code>isParentOf</code> and the
other one going from child to parent might be called <code>isChildOf</code>.</p>
<p>Relation definition allows you to specify such "inverse relation" - for
the relation you just define you specify which is the inverse relation.
Note that in the second example we should have two relation definitions
- one for <code>isParentOf</code> which defines <code>isChildOf</code> as inverse
relation and then second relation definition for <code>isChildOf</code> which
defines <code>isParentOf</code> as inverse relation.</p>
<p>What this does internally is that whenever we save a relation which has
defined inverse relation, we check that this inverse relation exists on
the relation target note. Similarly, when we delete relation, we also delete
inverse relation on the target note.</p>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 44 KiB

View File

@@ -1,159 +1,139 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../style.css">
<base target="_parent">
<title data-trilium-title>Relations</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Relations</h1>
<div class="ck-content">
<p>A relation is similar to a <a href="#root/_help_HI6GBBIduIgv">label</a>,
but instead of having a text value it refers to another note.</p>
<h2>Common use cases</h2>
<ul>
<li><strong>Metadata Relationships for personal use</strong>: For example,
linking a book note to an author note.
<br>This can be combined with&nbsp;<a class="reference-link" href="#root/_help_OFXdgB2nNk1F">Promoted Attributes</a>&nbsp;to
make their display more user-friendly.</li>
<li><strong>Configuration</strong>: For configuring some notes such as&nbsp;
<a
class="reference-link" href="#root/_help_HcABDtFCkbFN">Render Note</a>, or configuring&nbsp;<a class="reference-link" href="#root/_help_R9pX4DGra2Vt">Sharing</a>&nbsp;or&nbsp;
<a
class="reference-link" href="#root/_help_KC1HB96bqqHX">Templates</a>&nbsp;(see the list below).</li>
<li><strong>Scripting</strong>: Attaching scripts to events or conditions
related to the note.</li>
</ul>
<h2>Creating a relation using the visual editor</h2>
<ol>
<li>Go to the <em>Owned Attributes</em> section in the&nbsp;<a class="reference-link"
href="#root/_help_BlN9DFI679QC">Ribbon</a>.</li>
<li>Press the + button (<em>Add new attribute</em>) to the right.</li>
<li>Select <em>Add new relation</em> for the relation.</li>
</ol>
<aside class="admonition tip">
<p>If you prefer keyboard shortcuts, press <kbd>Alt</kbd>+<kbd>L</kbd> while
focused on a note or in the <em>Owned Attributes</em> section to display
the visual editor.</p>
</aside>
<p>While in the visual editor:</p>
<ul>
<li>Set the desired name</li>
<li>Set the Target note (the note to point to). Unlike labels, relations cannot
exist with a target note.</li>
<li>Check <em>Inheritable</em> if the label should be inherited by the child
notes as well. See&nbsp;<a class="reference-link" href="#root/_help_bwZpz2ajCEwO">Attribute Inheritance</a>&nbsp;for
more information.</li>
</ul>
<h2>Creating a relation manually</h2>
<p>In the <em>Owned Attributes</em> section in the&nbsp;<a class="reference-link"
href="#root/_help_BlN9DFI679QC">Ribbon</a>:</p>
<ul>
<li>To create a relation called <code>myRelation</code>:
<ul>
<li>First type <code>~myRelation=@</code>.</li>
<li>After this, an autocompletion box should appear.</li>
<li>Type the title of the note to point to and press <kbd>Enter</kbd> to confirm
(or click the desired note).</li>
<li>Alternatively copy a note from the&nbsp;<a class="reference-link" href="#root/_help_oPVyFC7WL2Lp">Note Tree</a>&nbsp;and
paste it after the <code>=</code> sign (without the <code>@</code>, in this
case).</li>
</ul>
</li>
<li>To create an inheritable relation, follow the same steps as previously
described but instead of <code>~myRelation</code> write <code>~myRelation(inheritable)</code>.</li>
</ul>
<h2>Predefined relations</h2>
<p>These relations are supported and used internally by Trilium.</p>
<aside
class="admonition tip">
<p>Some relations presented here end with a <code>*</code>. That means that
there are multiple relations with the same prefix, consult the specific
page linked in the description of that relation for more information.</p>
</aside>
<figure class="table" style="width:100%;">
<table class="ck-table-resized">
<colgroup>
<col style="width:33.95%;">
<col style="width:66.05%;">
</colgroup>
<thead>
<tr>
<th>Label</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>runOn*</code>
</td>
<td>See&nbsp;<a class="reference-link" href="#root/_help_GPERMystNGTB">Events</a>
</td>
</tr>
<tr>
<td><code>template</code>
</td>
<td>note's attributes will be inherited even without a parent-child relationship,
note's content and subtree will be added to instance notes if empty. See
documentation for details.</td>
</tr>
<tr>
<td><code>inherit</code>
</td>
<td>note's attributes will be inherited even without a parent-child relationship.
See&nbsp;<a class="reference-link" href="#root/_help_KC1HB96bqqHX">Templates</a>&nbsp;for
a similar concept. See&nbsp;<a class="reference-link" href="#root/_help_bwZpz2ajCEwO">Attribute Inheritance</a>&nbsp;in
the documentation.</td>
</tr>
<tr>
<td><code>renderNote</code>
</td>
<td>notes of type&nbsp;<a class="reference-link" href="#root/_help_HcABDtFCkbFN">Render Note</a>&nbsp;will
be rendered using a code note (HTML or script) and it is necessary to point
using this relation to which note should be rendered</td>
</tr>
<tr>
<td><code>widget_relation</code>
</td>
<td>target of this relation will be executed and rendered as a widget in the
sidebar</td>
</tr>
<tr>
<td><code>shareCss</code>
</td>
<td>CSS note which will be injected into the share page. CSS note must be
in the shared sub-tree as well. Consider using <code>share_hidden_from_tree</code> and <code>share_omit_default_css</code> as
well.</td>
</tr>
<tr>
<td><code>shareJs</code>
</td>
<td>JavaScript note which will be injected into the share page. JS note must
be in the shared sub-tree as well. Consider using <code>share_hidden_from_tree</code>.</td>
</tr>
<tr>
<td><code>shareTemplate</code>
</td>
<td>Embedded JavaScript note that will be used as the template for displaying
the shared note. Falls back to the default template. Consider using <code>share_hidden_from_tree</code>.</td>
</tr>
<tr>
<td><code>shareFavicon</code>
</td>
<td>Favicon note to be set in the shared page. Typically you want to set it
to share root and make it inheritable. Favicon note must be in the shared
sub-tree as well. Consider using <code>share_hidden_from_tree</code>.</td>
</tr>
</tbody>
</table>
</figure>
</div>
</div>
</body>
</html>
<p>A relation is similar to a <a href="#root/_help_HI6GBBIduIgv">label</a>,
but instead of having a text value it refers to another note.</p>
<h2>Common use cases</h2>
<ul>
<li><strong>Metadata Relationships for personal use</strong>: For example,
linking a book note to an author note.
<br>This can be combined with&nbsp;<a class="reference-link" href="#root/_help_OFXdgB2nNk1F">Promoted Attributes</a>&nbsp;to
make their display more user-friendly.</li>
<li><strong>Configuration</strong>: For configuring some notes such as&nbsp;
<a
class="reference-link" href="#root/_help_HcABDtFCkbFN">Render Note</a>, or configuring&nbsp;<a class="reference-link" href="#root/_help_R9pX4DGra2Vt">Sharing</a>&nbsp;or&nbsp;
<a
class="reference-link" href="#root/_help_KC1HB96bqqHX">Templates</a>&nbsp;(see the list below).</li>
<li><strong>Scripting</strong>: Attaching scripts to events or conditions
related to the note.</li>
</ul>
<h2>Creating a relation using the visual editor</h2>
<ol>
<li>Go to the <em>Owned Attributes</em> section in the&nbsp;<a class="reference-link"
href="#root/_help_BlN9DFI679QC">Ribbon</a>.</li>
<li>Press the + button (<em>Add new attribute</em>) to the right.</li>
<li>Select <em>Add new relation</em> for the relation.</li>
</ol>
<aside class="admonition tip">
<p>If you prefer keyboard shortcuts, press <kbd>Alt</kbd>+<kbd>L</kbd> while
focused on a note or in the <em>Owned Attributes</em> section to display
the visual editor.</p>
</aside>
<p>While in the visual editor:</p>
<ul>
<li>Set the desired name</li>
<li>Set the Target note (the note to point to). Unlike labels, relations cannot
exist with a target note.</li>
<li>Check <em>Inheritable</em> if the label should be inherited by the child
notes as well. See&nbsp;<a class="reference-link" href="#root/_help_bwZpz2ajCEwO">Attribute Inheritance</a>&nbsp;for
more information.</li>
</ul>
<h2>Creating a relation manually</h2>
<p>In the <em>Owned Attributes</em> section in the&nbsp;<a class="reference-link"
href="#root/_help_BlN9DFI679QC">Ribbon</a>:</p>
<ul>
<li>To create a relation called <code>myRelation</code>:
<ul>
<li>First type <code>~myRelation=@</code>.</li>
<li>After this, an autocompletion box should appear.</li>
<li>Type the title of the note to point to and press <kbd>Enter</kbd> to confirm
(or click the desired note).</li>
<li>Alternatively copy a note from the&nbsp;<a class="reference-link" href="#root/_help_oPVyFC7WL2Lp">Note Tree</a>&nbsp;and
paste it after the <code>=</code> sign (without the <code>@</code>, in this
case).</li>
</ul>
</li>
<li>To create an inheritable relation, follow the same steps as previously
described but instead of <code>~myRelation</code> write <code>~myRelation(inheritable)</code>.</li>
</ul>
<h2>Predefined relations</h2>
<p>These relations are supported and used internally by Trilium.</p>
<aside
class="admonition tip">
<p>Some relations presented here end with a <code>*</code>. That means that
there are multiple relations with the same prefix, consult the specific
page linked in the description of that relation for more information.</p>
</aside>
<figure class="table" style="width:100%;">
<table class="ck-table-resized">
<colgroup>
<col style="width:33.95%;">
<col style="width:66.05%;">
</colgroup>
<thead>
<tr>
<th>Label</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>runOn*</code>
</td>
<td>See&nbsp;<a class="reference-link" href="#root/_help_GPERMystNGTB">Events</a>
</td>
</tr>
<tr>
<td><code>template</code>
</td>
<td>note's attributes will be inherited even without a parent-child relationship,
note's content and subtree will be added to instance notes if empty. See
documentation for details.</td>
</tr>
<tr>
<td><code>inherit</code>
</td>
<td>note's attributes will be inherited even without a parent-child relationship.
See&nbsp;<a class="reference-link" href="#root/_help_KC1HB96bqqHX">Templates</a>&nbsp;for
a similar concept. See&nbsp;<a class="reference-link" href="#root/_help_bwZpz2ajCEwO">Attribute Inheritance</a>&nbsp;in
the documentation.</td>
</tr>
<tr>
<td><code>renderNote</code>
</td>
<td>notes of type&nbsp;<a class="reference-link" href="#root/_help_HcABDtFCkbFN">Render Note</a>&nbsp;will
be rendered using a code note (HTML or script) and it is necessary to point
using this relation to which note should be rendered</td>
</tr>
<tr>
<td><code>widget_relation</code>
</td>
<td>target of this relation will be executed and rendered as a widget in the
sidebar</td>
</tr>
<tr>
<td><code>shareCss</code>
</td>
<td>CSS note which will be injected into the share page. CSS note must be
in the shared sub-tree as well. Consider using <code>share_hidden_from_tree</code> and <code>share_omit_default_css</code> as
well.</td>
</tr>
<tr>
<td><code>shareJs</code>
</td>
<td>JavaScript note which will be injected into the share page. JS note must
be in the shared sub-tree as well. Consider using <code>share_hidden_from_tree</code>.</td>
</tr>
<tr>
<td><code>shareTemplate</code>
</td>
<td>Embedded JavaScript note that will be used as the template for displaying
the shared note. Falls back to the default template. Consider using <code>share_hidden_from_tree</code>.</td>
</tr>
<tr>
<td><code>shareFavicon</code>
</td>
<td>Favicon note to be set in the shared page. Typically you want to set it
to share root and make it inheritable. Favicon note must be in the shared
sub-tree as well. Consider using <code>share_hidden_from_tree</code>.</td>
</tr>
</tbody>
</table>
</figure>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

@@ -1,189 +1,169 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../style.css">
<base target="_parent">
<title data-trilium-title>Bulk Actions</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Bulk Actions</h1>
<div class="ck-content">
<figure class="image">
<img style="aspect-ratio:1425/654;" src="Bulk Actions_image.png" width="1425"
height="654">
</figure>
<p>The <em>Bulk Actions</em> dialog makes it easy to apply changes to multiple
notes at once, ranging from simple actions such as adding or removing a
label to being executing custom scripts.</p>
<h2>Interaction</h2>
<figure class="image">
<img style="aspect-ratio:1425/654;" src="Bulk Actions_image.png" width="1425"
height="654">
</figure>
<p>The <em>Bulk Actions</em> dialog makes it easy to apply changes to multiple
notes at once, ranging from simple actions such as adding or removing a
label to being executing custom scripts.</p>
<h2>Interaction</h2>
<ul>
<li>The first step is to select the notes in the&nbsp;<a class="reference-link"
href="#root/_help_oPVyFC7WL2Lp">Note Tree</a>. It's possible to apply bulk
actions to:
<ul>
<li>A single note (and potentially its child notes) simply by clicking on
it (with a left click or a right click).</li>
<li>Multiple notes. See&nbsp;<a class="reference-link" href="#root/_help_yTjUdsOi4CIE">Multiple selection</a>&nbsp;on
how to do so.</li>
</ul>
</li>
<li>Right click in the&nbsp;<a class="reference-link" href="#root/_help_oPVyFC7WL2Lp">Note Tree</a>&nbsp;and
select <em>Advanced</em><em>Apply bulk actions</em>.</li>
<li>By default, only the selected notes will be affected. To also include
all the descendants of the notes, check <em>Include descendants of the selected notes</em>.
The number of affected notes at the top of the dialog will update to reflect
the change.</li>
<li>Click on which action to apply from the <em>Available actions</em> section.
A detailed description of each is available in the next section.
<ul>
<li>For each action selected, the <em>Chosen actions</em> section will update
to reveal the entry. Each action will have its own configuration.</li>
<li>To remove an action, simply press the X button to the right of it.</li>
<li>It is possible to apply multiple actions of the same type, such as adding
multiple types.</li>
</ul>
</li>
<li>When all the actions are defined, press <em>Execute bulk actions</em> to
trigger all of them at once.</li>
<li>For convenience, the last bulk action configuration is saved for further
use and will be restored when entering the dialog again.</li>
</ul>
<h2>Actions</h2>
<h3>Labels</h3>
<p>These actions operate the&nbsp;<a class="reference-link" href="#root/_help_HI6GBBIduIgv">Labels</a>&nbsp;of
a note:</p>
<ul>
<li><strong>Add label</strong>
<ul>
<li>For each note, if it doesn't already have a <a href="#root/_help_HI6GBBIduIgv">label</a> of
the given name, it will create it. Keep the <em>New value</em> field empty
to create a label without a value, or complete it to assign a value.</li>
<li>If a note already has this label, its value will be updated.</li>
</ul>
</li>
<li><strong>Update label value</strong>
<ul>
<li>For each note, if it has a <a href="#root/_help_HI6GBBIduIgv">label</a> of
the given name, it will change its value to the specified one. Leave <em>New value</em> field
empty to create a label without a value.</li>
<li>Notes without the label will not be affected.</li>
</ul>
</li>
<li><em><strong>Rename label</strong></em>
<ul>
<li>For each note, if it has a <a href="#root/_help_HI6GBBIduIgv">label</a> of
the given name, it will be renamed/replaced with a label of the new name.
The value of the label (if present) will be kept intact.</li>
<li>Notes without the label will not be affected.</li>
</ul>
</li>
<li><strong>Delete label</strong>
<ul>
<li>For each note, if it has a label of a given name, it will be deleted (regardless
of whether it has a value or not).</li>
<li>Notes without the label will not be affected.</li>
</ul>
</li>
</ul>
<h3>Relations</h3>
<p>These actions operate the&nbsp;<a class="reference-link" href="#root/_help_Cq5X6iKQop6R">Relations</a>&nbsp;of
a note:</p>
<ul>
<li><strong>Add relation</strong>
<ul>
<li>For each note, it will create a relation pointing to the given note.</li>
<li>Notes without this relation will not be affected.</li>
</ul>
</li>
<li><strong>Update relation target</strong>
<ul>
<li>For each note, it will modify a relation to point to the newly given note.</li>
<li>Notes without this relation will not be affected.</li>
</ul>
</li>
<li><strong>Rename relation</strong>
<ul>
<li>For each note, if it has a relation of the given name, it will be renamed/replaced
with a relation of the new name. The target note of the relation will be
kept intact.</li>
<li>Notes without this relation will not be affected.</li>
</ul>
</li>
<li><strong>Delete relation</strong>
<ul>
<li>For each note, if it has a relation of the given name, it will be deleted.</li>
<li>Notes without this relation will not be affected.</li>
</ul>
</li>
</ul>
<h3>Notes</h3>
<ul>
<li><strong>Rename note</strong>
<ul>
<li>For each note, it will change the title of the note to the given one.</li>
<li>As a more advanced use case, the note can be a “template string” which
allows for dynamic values with access to the note information via&nbsp;
<a
class="reference-link" href="#root/_help_habiZ3HU8Kw8">FNote</a>, for example:
<ul>
<li><code>NEW: ${note.title}</code> will prefix all notes with <code>NEW:</code> .</li>
<li><code>${note.dateCreatedObj.format('MM-DD:')}: ${note.title}</code> will
prefix the note titles with each note's creation date (in month-day format).</li>
</ul>
</li>
</ul>
</li>
<li><strong>Move note</strong>
<ul>
<li>For each note, it will be moved to the specified parent note.</li>
<li>As an alternative for less complex situations, the notes can be moved
directly from within the&nbsp;<a class="reference-link" href="#root/_help_oPVyFC7WL2Lp">Note Tree</a>&nbsp;via
cut → paste or via the contextual menu.</li>
</ul>
</li>
<li><strong>Delete note</strong>
<ul>
<li>For each note, it will be deleted.</li>
<li>As an alternative for less complex situations, the notes can be removed
directly from within the&nbsp;<a class="reference-link" href="#root/_help_oPVyFC7WL2Lp">Note Tree</a>&nbsp;by
selecting them and pressing <kbd>Delete</kbd>.</li>
</ul>
</li>
<li><strong>Delete note revisions</strong>
<ul>
<li>This will delete all the&nbsp;<a class="reference-link" href="#root/_help_vZWERwf8U3nx">Note Revisions</a>&nbsp;of
the notes.</li>
</ul>
</li>
</ul>
<h3>Others</h3>
<ul>
<li><strong>Execute script</strong>
<ul>
<li>For more complex scenarios, it is possible to type in a JavaScript expression
in order to apply the necessary changes.</li>
<li>Examples:
<ul>
<li>The first step is to select the notes in the&nbsp;<a class="reference-link"
href="#root/_help_oPVyFC7WL2Lp">Note Tree</a>. It's possible to apply bulk
actions to:
<ul>
<li>A single note (and potentially its child notes) simply by clicking on
it (with a left click or a right click).</li>
<li>Multiple notes. See&nbsp;<a class="reference-link" href="#root/_help_yTjUdsOi4CIE">Multiple selection</a>&nbsp;on
how to do so.</li>
</ul>
<li>
<p>To apply a suffix (<code>- 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>
</li>
<li>Right click in the&nbsp;<a class="reference-link" href="#root/_help_oPVyFC7WL2Lp">Note Tree</a>&nbsp;and
select <em>Advanced</em><em>Apply bulk actions</em>.</li>
<li>By default, only the selected notes will be affected. To also include
all the descendants of the notes, check <em>Include descendants of the selected notes</em>.
The number of affected notes at the top of the dialog will update to reflect
the change.</li>
<li>Click on which action to apply from the <em>Available actions</em> section.
A detailed description of each is available in the next section.
<ul>
<li>For each action selected, the <em>Chosen actions</em> section will update
to reveal the entry. Each action will have its own configuration.</li>
<li>To remove an action, simply press the X button to the right of it.</li>
<li>It is possible to apply multiple actions of the same type, such as adding
multiple types.</li>
</ul>
</li>
<li>When all the actions are defined, press <em>Execute bulk actions</em> to
trigger all of them at once.</li>
<li>For convenience, the last bulk action configuration is saved for further
use and will be restored when entering the dialog again.</li>
</ul>
<h2>Actions</h2>
<h3>Labels</h3>
<p>These actions operate the&nbsp;<a class="reference-link" href="#root/_help_HI6GBBIduIgv">Labels</a>&nbsp;of
a note:</p>
<ul>
<li><strong>Add label</strong>
<ul>
<li>For each note, if it doesn't already have a <a href="#root/_help_HI6GBBIduIgv">label</a> of
the given name, it will create it. Keep the <em>New value</em> field empty
to create a label without a value, or complete it to assign a value.</li>
<li>If a note already has this label, its value will be updated.</li>
</ul>
</li>
<li><strong>Update label value</strong>
<ul>
<li>For each note, if it has a <a href="#root/_help_HI6GBBIduIgv">label</a> of
the given name, it will change its value to the specified one. Leave <em>New value</em> field
empty to create a label without a value.</li>
<li>Notes without the label will not be affected.</li>
</ul>
</li>
<li><em><strong>Rename label</strong></em>
<ul>
<li>For each note, if it has a <a href="#root/_help_HI6GBBIduIgv">label</a> of
the given name, it will be renamed/replaced with a label of the new name.
The value of the label (if present) will be kept intact.</li>
<li>Notes without the label will not be affected.</li>
</ul>
</li>
<li><strong>Delete label</strong>
<ul>
<li>For each note, if it has a label of a given name, it will be deleted (regardless
of whether it has a value or not).</li>
<li>Notes without the label will not be affected.</li>
</ul>
<li>
<p>To alter attributes of a note based on another attribute, such as setting
the <code>#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>
</li>
</ul>
<h3>Relations</h3>
<p>These actions operate the&nbsp;<a class="reference-link" href="#root/_help_Cq5X6iKQop6R">Relations</a>&nbsp;of
a note:</p>
<ul>
<li><strong>Add relation</strong>
<ul>
<li>For each note, it will create a relation pointing to the given note.</li>
<li>Notes without this relation will not be affected.</li>
</ul>
</li>
<li><strong>Update relation target</strong>
<ul>
<li>For each note, it will modify a relation to point to the newly given note.</li>
<li>Notes without this relation will not be affected.</li>
</ul>
</li>
<li><strong>Rename relation</strong>
<ul>
<li>For each note, if it has a relation of the given name, it will be renamed/replaced
with a relation of the new name. The target note of the relation will be
kept intact.</li>
<li>Notes without this relation will not be affected.</li>
</ul>
</li>
<li><strong>Delete relation</strong>
<ul>
<li>For each note, if it has a relation of the given name, it will be deleted.</li>
<li>Notes without this relation will not be affected.</li>
</ul>
</li>
</ul>
<h3>Notes</h3>
<ul>
<li><strong>Rename note</strong>
<ul>
<li>For each note, it will change the title of the note to the given one.</li>
<li>As a more advanced use case, the note can be a “template string” which
allows for dynamic values with access to the note information via&nbsp;
<a
class="reference-link" href="#root/_help_habiZ3HU8Kw8">FNote</a>, for example:
<ul>
<li><code>NEW: ${note.title}</code> will prefix all notes with <code>NEW:</code> .</li>
<li><code>${note.dateCreatedObj.format('MM-DD:')}: ${note.title}</code> will
prefix the note titles with each note's creation date (in month-day format).</li>
</ul>
</li>
</ul>
</li>
<li><strong>Move note</strong>
<ul>
<li>For each note, it will be moved to the specified parent note.</li>
<li>As an alternative for less complex situations, the notes can be moved
directly from within the&nbsp;<a class="reference-link" href="#root/_help_oPVyFC7WL2Lp">Note Tree</a>&nbsp;via
cut → paste or via the contextual menu.</li>
</ul>
</li>
<li><strong>Delete note</strong>
<ul>
<li>For each note, it will be deleted.</li>
<li>As an alternative for less complex situations, the notes can be removed
directly from within the&nbsp;<a class="reference-link" href="#root/_help_oPVyFC7WL2Lp">Note Tree</a>&nbsp;by
selecting them and pressing <kbd>Delete</kbd>.</li>
</ul>
</li>
<li><strong>Delete note revisions</strong>
<ul>
<li>This will delete all the&nbsp;<a class="reference-link" href="#root/_help_vZWERwf8U3nx">Note Revisions</a>&nbsp;of
the notes.</li>
</ul>
</li>
</ul>
<h3>Others</h3>
<ul>
<li><strong>Execute script</strong>
<ul>
<li>For more complex scenarios, it is possible to type in a JavaScript expression
in order to apply the necessary changes.</li>
<li>Examples:
<ul>
<li>
<p>To apply a suffix (<code>- 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>
</li>
<li>
<p>To alter attributes of a note based on another attribute, such as setting
the <code>#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>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
</body>
</html>
</li>
</ul>
</li>
</ul>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 53 KiB

View File

@@ -1,47 +1,27 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../style.css">
<base target="_parent">
<title data-trilium-title>Configuration (config.ini or environment variables)</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Configuration (config.ini or environment variables)</h1>
<div class="ck-content">
<p>Trilium supports configuration via a file named <code>config.ini</code> and
environment variables. Please review the file named <a href="https://github.com/TriliumNext/Notes/blob/develop/config-sample.ini">config-sample.ini</a> in
the <a href="https://github.com/TriliumNext/Notes">Notes</a> repository to
see what values are supported.</p>
<p>You can provide the same values via environment variables instead of the <code>config.ini</code> file,
and these environment variables use the following format:</p>
<ol>
<li>Environment variables should be prefixed with <code>TRILIUM_</code> and
use underscores to represent the INI section structure.</li>
<li>The format is: <code>TRILIUM_&lt;SECTION&gt;_&lt;KEY&gt;=&lt;VALUE&gt;</code>
</li>
<li>The environment variables will override any matching values from config.ini</li>
</ol>
<p>For example, if you have this in your config.ini:</p><pre><code class="language-text-x-trilium-auto">[Network]
<p>Trilium supports configuration via a file named <code>config.ini</code> and
environment variables. Please review the file named <a href="https://github.com/TriliumNext/Notes/blob/develop/config-sample.ini">config-sample.ini</a> in
the <a href="https://github.com/TriliumNext/Notes">Notes</a> repository to
see what values are supported.</p>
<p>You can provide the same values via environment variables instead of the <code>config.ini</code> file,
and these environment variables use the following format:</p>
<ol>
<li>Environment variables should be prefixed with <code>TRILIUM_</code> and
use underscores to represent the INI section structure.</li>
<li>The format is: <code>TRILIUM_&lt;SECTION&gt;_&lt;KEY&gt;=&lt;VALUE&gt;</code>
</li>
<li>The environment variables will override any matching values from config.ini</li>
</ol>
<p>For example, if you have this in your config.ini:</p><pre><code class="language-text-x-trilium-auto">[Network]
host=localhost
port=8080</code></pre>
<p>You can override these values using environment variables:</p><pre><code class="language-text-x-trilium-auto">TRILIUM_NETWORK_HOST=0.0.0.0
<p>You can override these values using environment variables:</p><pre><code class="language-text-x-trilium-auto">TRILIUM_NETWORK_HOST=0.0.0.0
TRILIUM_NETWORK_PORT=9000</code></pre>
<p>The code will:</p>
<ol>
<li>First load the <code>config.ini</code> file as before</li>
<li>Then scan all environment variables for ones starting with <code>TRILIUM_</code>
</li>
<li>Parse these variables into section/key pairs</li>
<li>Merge them with the config from the file, with environment variables taking
precedence</li>
</ol>
</div>
</div>
</body>
</html>
<p>The code will:</p>
<ol>
<li>First load the <code>config.ini</code> file as before</li>
<li>Then scan all environment variables for ones starting with <code>TRILIUM_</code>
</li>
<li>Parse these variables into section/key pairs</li>
<li>Merge them with the config from the file, with environment variables taking
precedence</li>
</ol>

View File

@@ -1,37 +1,17 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../style.css">
<base target="_parent">
<title data-trilium-title>Trilium instance</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Trilium instance</h1>
<div class="ck-content">
<p>A Trilium instance represents a server. If&nbsp;<a class="reference-link"
href="#root/_help_cbkrhQjrkKrh">Synchronization</a>&nbsp;is set up, since
multiple servers are involved (the one from the desktop client and the
one the synchronisation is set up with), sometimes it can be useful to
distinguish the instance you are running on.</p>
<h2>Setting the instance name</h2>
<p>To set up a name for the instance, modify the <code>config.ini</code>:</p><pre><code class="language-text-x-trilium-auto">[General]
<p>A Trilium instance represents a server. If&nbsp;<a class="reference-link"
href="#root/_help_cbkrhQjrkKrh">Synchronization</a>&nbsp;is set up, since
multiple servers are involved (the one from the desktop client and the
one the synchronisation is set up with), sometimes it can be useful to
distinguish the instance you are running on.</p>
<h2>Setting the instance name</h2>
<p>To set up a name for the instance, modify the <code>config.ini</code>:</p><pre><code class="language-text-x-trilium-auto">[General]
instanceName=Hello</code></pre>
<h2>Distinguishing the instance on back-end</h2>
<p>Use <code>api.getInstanceName()</code> to obtain the instance name of the
current server, as specified in the config file or in environment variables.</p>
<h2>Limiting script runs based on instance</h2>
<p>For a script that is run periodically or on a certain event, it's possible
to limit it to certain instances without having to change the code. Just
add <code>runOnInstance</code> and set as the value the instance name where
the script should run. To run on multiple named instances, simply add the
label multiple times.</p>
</div>
</div>
</body>
</html>
<h2>Distinguishing the instance on back-end</h2>
<p>Use <code>api.getInstanceName()</code> to obtain the instance name of the
current server, as specified in the config file or in environment variables.</p>
<h2>Limiting script runs based on instance</h2>
<p>For a script that is run periodically or on a certain event, it's possible
to limit it to certain instances without having to change the code. Just
add <code>runOnInstance</code> and set as the value the instance name where
the script should run. To run on multiple named instances, simply add the
label multiple times.</p>

View File

@@ -1,26 +1,11 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../style.css">
<base target="_parent">
<title data-trilium-title>Custom Request Handler</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Custom Request Handler</h1>
<div class="ck-content">
<p>Trilium provides a mechanism for <a href="#root/_help_CdNpE2pqjmI6">scripts</a> to
open a public REST endpoint. This opens a way for various integrations
with other services - a simple example would be creating new note from
Slack by issuing a slash command (e.g. <code>/trilium buy milk</code>).</p>
<h2>Create note from outside Trilium</h2>
<p>Let's take a look at an example. The goal is to provide a REST endpoint
to which we can send title and content and Trilium will create a note.</p>
<p>We'll start with creating a JavaScript backend <a href="#root/_help_6f9hih2hXXZk">code note</a> containing:</p><pre><code class="language-text-x-trilium-auto">const {req, res} = api;
<p>Trilium provides a mechanism for <a href="#root/_help_CdNpE2pqjmI6">scripts</a> to
open a public REST endpoint. This opens a way for various integrations
with other services - a simple example would be creating new note from
Slack by issuing a slash command (e.g. <code>/trilium buy milk</code>).</p>
<h2>Create note from outside Trilium</h2>
<p>Let's take a look at an example. The goal is to provide a REST endpoint
to which we can send title and content and Trilium will create a note.</p>
<p>We'll start with creating a JavaScript backend <a href="#root/_help_6f9hih2hXXZk">code note</a> containing:</p><pre><code class="language-text-x-trilium-auto">const {req, res} = api;
const {secret, title, content} = req.body;
if (req.method == 'POST' &amp;&amp; secret === 'secret-password') {
@@ -37,15 +22,15 @@ if (req.method == 'POST' &amp;&amp; secret === 'secret-password') {
else {
res.send(400);
}</code></pre>
<p>This script note has also following two attributes:</p>
<ul>
<li>label <code>#customRequestHandler</code> with value <code>create-note</code>
</li>
<li>relation <code>~targetNote</code> pointing to a note where new notes should
be saved</li>
</ul>
<h3>Explanation</h3>
<p>Let's test this by using an HTTP client to send a request:</p><pre><code class="language-text-x-trilium-auto">POST http://my.trilium.org/custom/create-note
<p>This script note has also following two attributes:</p>
<ul>
<li>label <code>#customRequestHandler</code> with value <code>create-note</code>
</li>
<li>relation <code>~targetNote</code> pointing to a note where new notes should
be saved</li>
</ul>
<h3>Explanation</h3>
<p>Let's test this by using an HTTP client to send a request:</p><pre><code class="language-text-x-trilium-auto">POST http://my.trilium.org/custom/create-note
Content-Type: application/json
{
@@ -53,43 +38,38 @@ Content-Type: application/json
"title": "hello",
"content": "world"
}+++++++++++++++++++++++++++++++++++++++++++++++</code></pre>
<p>Notice the <code>/custom</code> part in the request path - Trilium considers
any request with this prefix as "custom" and tries to find a matching handler
by looking at all notes which have <code>customRequestHandler</code> <a href="#root/_help_zEY4DaJG4YT5">label</a>.
Value of this label then contains a regular expression which will match
the request path (in our case trivial regex "create-note").</p>
<p>Trilium will then find our code note created above and execute it. <code>api.req</code>, <code>api.res</code> are
set to <a href="https://expressjs.com/en/api.html#req">request</a> and
<a
href="https://expressjs.com/en/api.html#res">response</a>objects from which we can get details of the request and also
respond.</p>
<p>In the code note we check the request method and then use trivial authentication
- keep in mind that these endpoints are by default totally unauthenticated,
and you need to take care of this yourself.</p>
<p>Once we pass these checks we will just create the desired note using
<a
href="#root/_help_GLks18SNjxmC">Script API</a>.</p>
<h2>Custom resource provider</h2>
<p>Another common use case is that you want to just expose a file note -
in such case you create label <code>customResourceProvider</code> (value
is again path regex).</p>
<p>For more information, see&nbsp;<a href="#root/_help_d3fAXQ2diepH">Custom Resource Providers</a>.</p>
<h2>Advanced concepts</h2>
<p><code>api.req</code> and <code>api.res</code> are Express.js objects - you
can always look into its <a href="https://expressjs.com/en/api.html">documentation</a> for
details.</p>
<h3>Parameters</h3>
<p>REST request paths often contain parameters in the URL, e.g.:</p><pre><code class="language-text-x-trilium-auto">http://my.trilium.org/custom/notes/123</code></pre>
<p>The last part is dynamic so the matching of the URL must also be dynamic
- for this reason the matching is done with regular expressions. Following <code>customRequestHandler</code> value
would match it:</p><pre><code class="language-text-x-trilium-auto">notes/([0-9]+)</code></pre>
<p>Additionally, this also defines a matching group with the use of parenthesis
which then makes it easier to extract the value. The matched groups are
available in <code>api.pathParams</code>:</p><pre><code class="language-text-x-trilium-auto">const noteId = api.pathParams[0];</code></pre>
<p>Often you also need query params (as in e.g. <code>http://my.trilium.org/custom/notes?noteId=123</code>),
you can get those with standard express <code>req.query.noteId</code>.</p>
</div>
</div>
</body>
</html>
<p>Notice the <code>/custom</code> part in the request path - Trilium considers
any request with this prefix as "custom" and tries to find a matching handler
by looking at all notes which have <code>customRequestHandler</code> <a href="#root/_help_zEY4DaJG4YT5">label</a>.
Value of this label then contains a regular expression which will match
the request path (in our case trivial regex "create-note").</p>
<p>Trilium will then find our code note created above and execute it. <code>api.req</code>, <code>api.res</code> are
set to <a href="https://expressjs.com/en/api.html#req">request</a> and
<a
href="https://expressjs.com/en/api.html#res">response</a>objects from which we can get details of the request and also
respond.</p>
<p>In the code note we check the request method and then use trivial authentication
- keep in mind that these endpoints are by default totally unauthenticated,
and you need to take care of this yourself.</p>
<p>Once we pass these checks we will just create the desired note using
<a
href="#root/_help_GLks18SNjxmC">Script API</a>.</p>
<h2>Custom resource provider</h2>
<p>Another common use case is that you want to just expose a file note -
in such case you create label <code>customResourceProvider</code> (value
is again path regex).</p>
<p>For more information, see&nbsp;<a href="#root/_help_d3fAXQ2diepH">Custom Resource Providers</a>.</p>
<h2>Advanced concepts</h2>
<p><code>api.req</code> and <code>api.res</code> are Express.js objects - you
can always look into its <a href="https://expressjs.com/en/api.html">documentation</a> for
details.</p>
<h3>Parameters</h3>
<p>REST request paths often contain parameters in the URL, e.g.:</p><pre><code class="language-text-x-trilium-auto">http://my.trilium.org/custom/notes/123</code></pre>
<p>The last part is dynamic so the matching of the URL must also be dynamic
- for this reason the matching is done with regular expressions. Following <code>customRequestHandler</code> value
would match it:</p><pre><code class="language-text-x-trilium-auto">notes/([0-9]+)</code></pre>
<p>Additionally, this also defines a matching group with the use of parenthesis
which then makes it easier to extract the value. The matched groups are
available in <code>api.pathParams</code>:</p><pre><code class="language-text-x-trilium-auto">const noteId = api.pathParams[0];</code></pre>
<p>Often you also need query params (as in e.g. <code>http://my.trilium.org/custom/notes?noteId=123</code>),
you can get those with standard express <code>req.query.noteId</code>.</p>

View File

@@ -1,56 +1,36 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../style.css">
<base target="_parent">
<title data-trilium-title>Custom Resource Providers</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Custom Resource Providers</h1>
<div class="ck-content">
<p>A custom resource provider allows any file imported into Trilium (images,
fonts, stylesheets) to be publicly accessible via a URL.</p>
<p>A potential use case for this is to add embed a custom font alongside
a theme.</p>
<h2>Steps for creating a custom resource provider</h2>
<ol>
<li>Import a file such as an image or a font into Trilium by drag &amp; drop.</li>
<li>Select the file and go to the <em>Owned Attributes</em> section.</li>
<li>Add the label <code>#customResourceProvider=hello</code>.</li>
<li>To test if it is working, use a browser to navigate to <code>&lt;protocol&gt;://&lt;host&gt;/custom/hello</code> (where <code>&lt;protocol&gt;</code> is
either <code>http</code> or <code>https</code> based on your setup, and <code>&lt;host&gt;</code> is
the host or IP to your Trilium server instance). If you are running the
TriliumNext application without a server, use <code>http://localhost:37840</code> as
the base URL.</li>
<li>If everything went well, at the previous step the browser should have
downloaded the file uploaded in the first step.</li>
</ol>
<p>Instead of <code>hello</code>, the name can be:</p>
<ul>
<li>A path, such as <code>fonts/Roboto.ttf</code>, which would be accessible
via <code>&lt;host&gt;/custom/fonts/Roboto.ttf</code>.</li>
<li>As a more advanced use case, a regular expression to match multiple routes,
such as <code>hello/.*</code> which will be accessible via <code>/custom/hello/1</code>, <code>/custom/hello/2</code>, <code>/custom/hello/world</code>,
etc.</li>
</ul>
<h2>Using it in a theme</h2>
<p>For example, if you have a custom font to be imported by the theme, first
upload a font file into Trilium and assign it the <code>#customResourceProvider=fonts/myfont.ttf</code> attribute.</p>
<p>Then modify the theme CSS to point to:</p><pre><code class="language-text-css">@font-face {
<p>A custom resource provider allows any file imported into Trilium (images,
fonts, stylesheets) to be publicly accessible via a URL.</p>
<p>A potential use case for this is to add embed a custom font alongside
a theme.</p>
<h2>Steps for creating a custom resource provider</h2>
<ol>
<li>Import a file such as an image or a font into Trilium by drag &amp; drop.</li>
<li>Select the file and go to the <em>Owned Attributes</em> section.</li>
<li>Add the label <code>#customResourceProvider=hello</code>.</li>
<li>To test if it is working, use a browser to navigate to <code>&lt;protocol&gt;://&lt;host&gt;/custom/hello</code> (where <code>&lt;protocol&gt;</code> is
either <code>http</code> or <code>https</code> based on your setup, and <code>&lt;host&gt;</code> is
the host or IP to your Trilium server instance). If you are running the
TriliumNext application without a server, use <code>http://localhost:37840</code> as
the base URL.</li>
<li>If everything went well, at the previous step the browser should have
downloaded the file uploaded in the first step.</li>
</ol>
<p>Instead of <code>hello</code>, the name can be:</p>
<ul>
<li>A path, such as <code>fonts/Roboto.ttf</code>, which would be accessible
via <code>&lt;host&gt;/custom/fonts/Roboto.ttf</code>.</li>
<li>As a more advanced use case, a regular expression to match multiple routes,
such as <code>hello/.*</code> which will be accessible via <code>/custom/hello/1</code>, <code>/custom/hello/2</code>, <code>/custom/hello/world</code>,
etc.</li>
</ul>
<h2>Using it in a theme</h2>
<p>For example, if you have a custom font to be imported by the theme, first
upload a font file into Trilium and assign it the <code>#customResourceProvider=fonts/myfont.ttf</code> attribute.</p>
<p>Then modify the theme CSS to point to:</p><pre><code class="language-text-css">@font-face {
font-family: customFont;
src: url("/custom/fonts/myfont.ttf");
}
div {
font-family: customFont;
}</code></pre>
</div>
</div>
</body>
</html>
}</code></pre>

View File

@@ -1,47 +1,27 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../style.css">
<base target="_parent">
<title data-trilium-title>Database</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Database</h1>
<div class="ck-content">
<p>Your Trilium data is stored in a <a href="https://www.sqlite.org">SQLite</a> database
which contains all notes, tree structure, metadata, and most of the configuration.
The database file is named <code>document.db</code> and is stored in the
application's default&nbsp;<a href="#root/_help_tAassRL4RSQL">Data directory</a>.</p>
<h2>Demo Notes</h2>
<p>When first starting Trilium, it will provide a set of notes to showcase
various features of the application.</p>
<p>For more information see&nbsp;<a class="reference-link" href="#root/_help_6tZeKvSHEUiB">Demo Notes</a>.</p>
<h2>Manually Modifying the Database</h2>
<p>Trilium provides a lot of flexibility, and with it, opportunities for
advanced users to tweak it. If you need to explore or modify the database
directly, you can use a tool such as <a href="https://sqlitebrowser.org/">SQLite Browser</a> to
work directly on the database file.</p>
<p>See&nbsp;<a href="#root/_help_oyIAJ9PvvwHX">Manually altering the database</a>&nbsp;for
more information.</p>
<h2>How to Reset the Database</h2>
<p>If you are experimenting with Trilium and want to return it to its original
state, you can do that by deleting the current database. When you restart
the application, it will generate a new database containing the original
demo notes.</p>
<p>To delete the database, simply go to the <a href="#root/_help_tAassRL4RSQL">data directory</a> and
delete the <code>document.db</code> file (and any other files starting with <code>document.db</code>).</p>
<p>If you do not need to preserve any configurations that might be stored
in the <code>config.ini</code> file, you can just delete all of the <a href="#root/_help_tAassRL4RSQL">data directory's</a> contents
to fully restore the application to its original state. You can also review
the <a href="#root/_help_Gzjqa934BdH4">configuration</a> file to provide
all <code>config.ini</code> values as environment variables instead.</p>
</div>
</div>
</body>
</html>
<p>Your Trilium data is stored in a <a href="https://www.sqlite.org">SQLite</a> database
which contains all notes, tree structure, metadata, and most of the configuration.
The database file is named <code>document.db</code> and is stored in the
application's default&nbsp;<a href="#root/_help_tAassRL4RSQL">Data directory</a>.</p>
<h2>Demo Notes</h2>
<p>When first starting Trilium, it will provide a set of notes to showcase
various features of the application.</p>
<p>For more information see&nbsp;<a class="reference-link" href="#root/_help_6tZeKvSHEUiB">Demo Notes</a>.</p>
<h2>Manually Modifying the Database</h2>
<p>Trilium provides a lot of flexibility, and with it, opportunities for
advanced users to tweak it. If you need to explore or modify the database
directly, you can use a tool such as <a href="https://sqlitebrowser.org/">SQLite Browser</a> to
work directly on the database file.</p>
<p>See&nbsp;<a href="#root/_help_oyIAJ9PvvwHX">Manually altering the database</a>&nbsp;for
more information.</p>
<h2>How to Reset the Database</h2>
<p>If you are experimenting with Trilium and want to return it to its original
state, you can do that by deleting the current database. When you restart
the application, it will generate a new database containing the original
demo notes.</p>
<p>To delete the database, simply go to the <a href="#root/_help_tAassRL4RSQL">data directory</a> and
delete the <code>document.db</code> file (and any other files starting with <code>document.db</code>).</p>
<p>If you do not need to preserve any configurations that might be stored
in the <code>config.ini</code> file, you can just delete all of the <a href="#root/_help_tAassRL4RSQL">data directory's</a> contents
to fully restore the application to its original state. You can also review
the <a href="#root/_help_Gzjqa934BdH4">configuration</a> file to provide
all <code>config.ini</code> values as environment variables instead.</p>

View File

@@ -1,50 +1,30 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../style.css">
<base target="_parent">
<title data-trilium-title>Demo Notes</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Demo Notes</h1>
<div class="ck-content">
<p>When you run Trilium for the first time, it will generate a new database
containing demo notes. These notes showcase its many features, such as:</p>
<ul>
<li><a class="reference-link" href="#root/_help_iRwzGnHPzonm">Relation Map</a>
</li>
<li><a class="reference-link" href="#root/_help_l0tKav7yLHGF">Day Notes</a>
</li>
<li><a class="reference-link" href="#root/_help_R7abl2fc6Mxi">Weight Tracker</a>
</li>
<li><a class="reference-link" href="#root/_help_xYjQUYhpbUEW">Task Manager</a>
</li>
<li><a class="reference-link" href="#root/_help_Wy267RK4M69c">Themes</a>
</li>
</ul>
<h3>Restoring Demo Notes</h3>
<p>There are some cases in which you may want to restore the original demo
notes. For example, if you experimented with some of the more advanced
features and want to see the original reference, or if you simply want
to explore the latest version of the demo notes, which might showcase new
features.</p>
<p>You can easily restore the demo notes by using Trilium's built-in import
feature by importing them:</p>
<ul>
<li>Download <a href="https://github.com/TriliumNext/Notes/raw/develop/db/demo.zip">this .zip archive</a> with
the latest version of the demo notes</li>
<li>Right click on any note in your tree under which you would like the demo
notes to be imported</li>
<li>Click "Import into note"</li>
<li>Select the .zip archive to import it</li>
</ul>
</div>
</div>
</body>
</html>
<p>When you run Trilium for the first time, it will generate a new database
containing demo notes. These notes showcase its many features, such as:</p>
<ul>
<li><a class="reference-link" href="#root/_help_iRwzGnHPzonm">Relation Map</a>
</li>
<li><a class="reference-link" href="#root/_help_l0tKav7yLHGF">Day Notes</a>
</li>
<li><a class="reference-link" href="#root/_help_R7abl2fc6Mxi">Weight Tracker</a>
</li>
<li><a class="reference-link" href="#root/_help_xYjQUYhpbUEW">Task Manager</a>
</li>
<li><a class="reference-link" href="#root/_help_Wy267RK4M69c">Themes</a>
</li>
</ul>
<h3>Restoring Demo Notes</h3>
<p>There are some cases in which you may want to restore the original demo
notes. For example, if you experimented with some of the more advanced
features and want to see the original reference, or if you simply want
to explore the latest version of the demo notes, which might showcase new
features.</p>
<p>You can easily restore the demo notes by using Trilium's built-in import
feature by importing them:</p>
<ul>
<li>Download <a href="https://github.com/TriliumNext/Notes/raw/develop/db/demo.zip">this .zip archive</a> with
the latest version of the demo notes</li>
<li>Right click on any note in your tree under which you would like the demo
notes to be imported</li>
<li>Click "Import into note"</li>
<li>Select the .zip archive to import it</li>
</ul>

View File

@@ -1,56 +1,36 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../style.css">
<base target="_parent">
<title data-trilium-title>Manually altering the database</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Manually altering the database</h1>
<div class="ck-content">
<p>There are some situations where modifying the SQLite database that Trilium
uses is desirable.</p>
<p>If you are doing any advanced development or troubleshooting where you
manually modify the database, you might want to consider creating backups
of your <code>document.db</code> file.</p>
<h2>Modifying it internally using the SQL Console</h2>
<p>The SQL Console is Trilium's built-in database editor.</p>
<p>See&nbsp;<a class="reference-link" href="#root/_help_YKWqdJhzi2VY">SQL Console</a>.</p>
<h2>Externally modifying the database</h2>
<p>Sometimes the SQL Console cannot be used (for example if the application
cannot start).</p>
<p>When making external modifications, consider closing the desktop application.
If modifying the server database, then stop the service or Docker container.</p>
<h3>Using DB Browser for SQLite</h3>
<p>DB Browser for SQLite is a cross-platform editor that can be used to alter
the database using a graphical user interface.</p>
<p>To do so:</p>
<ol>
<li>In the main menu, select File → Open database… and navigate to the database
in the&nbsp;<a href="#root/_help_tAassRL4RSQL">Data directory</a>.</li>
<li>Select the <em>Execute SQL</em> tab.</li>
<li>Type in the desired SQL statement.</li>
<li>Press the "Play" button in the toolbar underneath the "Execute SQL" tab
(or F5 key).</li>
<li>Press "Write Changes" in the main toolbar.</li>
<li>Close the application or close the database.</li>
</ol>
<p>
<img src="Manually altering the data.png">
</p>
<h3>Using the SQLite CLI</h3>
<p>First, start the SQLite 3 CLI by specifying the path to the database:</p><pre><code class="language-text-x-trilium-auto">sqlite3 ~/.local/share/trilium-data/document.db</code></pre>
<ul>
<li>In the prompt simply type the statement and make sure it ends with a <code>;</code> character.</li>
<li>To exit, simply type <code>.quit</code> and enter.</li>
</ul>
</div>
</div>
</body>
</html>
<p>There are some situations where modifying the SQLite database that Trilium
uses is desirable.</p>
<p>If you are doing any advanced development or troubleshooting where you
manually modify the database, you might want to consider creating backups
of your <code>document.db</code> file.</p>
<h2>Modifying it internally using the SQL Console</h2>
<p>The SQL Console is Trilium's built-in database editor.</p>
<p>See&nbsp;<a class="reference-link" href="#root/_help_YKWqdJhzi2VY">SQL Console</a>.</p>
<h2>Externally modifying the database</h2>
<p>Sometimes the SQL Console cannot be used (for example if the application
cannot start).</p>
<p>When making external modifications, consider closing the desktop application.
If modifying the server database, then stop the service or Docker container.</p>
<h3>Using DB Browser for SQLite</h3>
<p>DB Browser for SQLite is a cross-platform editor that can be used to alter
the database using a graphical user interface.</p>
<p>To do so:</p>
<ol>
<li>In the main menu, select File → Open database… and navigate to the database
in the&nbsp;<a href="#root/_help_tAassRL4RSQL">Data directory</a>.</li>
<li>Select the <em>Execute SQL</em> tab.</li>
<li>Type in the desired SQL statement.</li>
<li>Press the "Play" button in the toolbar underneath the "Execute SQL" tab
(or F5 key).</li>
<li>Press "Write Changes" in the main toolbar.</li>
<li>Close the application or close the database.</li>
</ol>
<p>
<img src="Manually altering the data.png">
</p>
<h3>Using the SQLite CLI</h3>
<p>First, start the SQLite 3 CLI by specifying the path to the database:</p><pre><code class="language-text-x-trilium-auto">sqlite3 ~/.local/share/trilium-data/document.db</code></pre>
<ul>
<li>In the prompt simply type the statement and make sure it ends with a <code>;</code> character.</li>
<li>To exit, simply type <code>.quit</code> and enter.</li>
</ul>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 508 B

After

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 542 B

After

Width:  |  Height:  |  Size: 265 B

View File

@@ -1,56 +1,36 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../../style.css">
<base target="_parent">
<title data-trilium-title>SQL Console</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>SQL Console</h1>
<div class="ck-content">
<p>The SQL Console is Trilium's built-in database editor.</p>
<p>It can be accessed by going to the <a href="#root/_help_Vc8PjrjAGuOp">global menu</a>
Advanced → Open SQL Console.</p>
<p>
<img src="SQL Console_image.png">
</p>
<h3>Interaction</h3>
<ul>
<li>
<p>Hovering the mouse over one of the tables listed at the top of the document
will show the columns and their data type.</p>
</li>
<li>
<p>Only one SQL statement can be run at once.</p>
</li>
<li>
<p>To run the statement, press the
<img src="3_SQL Console_image.png">icon.</p>
</li>
<li>
<p>For queries that return a result, the data will displayed in a table.</p>
<p>
<img src="1_SQL Console_image.png">
</p>
</li>
</ul>
<h3>Saved SQL console</h3>
<p>SQL queries or commands can be saved into a dedicated note.</p>
<p>To do so, simply write the query and press the
<img src="2_SQL Console_image.png">button. Once saved, the note will appear in&nbsp;<a href="#root/_help_l0tKav7yLHGF">Day Notes</a>.</p>
<ul>
<li>The SQL expression will not be displayed by default, but it can still
be viewed by going to the note context menu and selecting <em>Note source</em>.</li>
<li>The expression cannot be modified. If needed, recreate it by copying the
statement back into the SQL console and then saving it again.</li>
</ul>
</div>
</div>
</body>
</html>
<p>The SQL Console is Trilium's built-in database editor.</p>
<p>It can be accessed by going to the <a href="#root/_help_Vc8PjrjAGuOp">global menu</a>
Advanced → Open SQL Console.</p>
<p>
<img src="SQL Console_image.png">
</p>
<h3>Interaction</h3>
<ul>
<li>
<p>Hovering the mouse over one of the tables listed at the top of the document
will show the columns and their data type.</p>
</li>
<li>
<p>Only one SQL statement can be run at once.</p>
</li>
<li>
<p>To run the statement, press the
<img src="3_SQL Console_image.png">icon.</p>
</li>
<li>
<p>For queries that return a result, the data will displayed in a table.</p>
<p>
<img src="1_SQL Console_image.png">
</p>
</li>
</ul>
<h3>Saved SQL console</h3>
<p>SQL queries or commands can be saved into a dedicated note.</p>
<p>To do so, simply write the query and press the
<img src="2_SQL Console_image.png">button. Once saved, the note will appear in&nbsp;<a href="#root/_help_l0tKav7yLHGF">Day Notes</a>.</p>
<ul>
<li>The SQL expression will not be displayed by default, but it can still
be viewed by going to the note context menu and selecting <em>Note source</em>.</li>
<li>The expression cannot be modified. If needed, recreate it by copying the
statement back into the SQL console and then saving it again.</li>
</ul>

View File

@@ -1,74 +1,54 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../style.css">
<base target="_parent">
<title data-trilium-title>Default Note Title</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Default Note Title</h1>
<div class="ck-content">
<p>When a new note is created, its name is by default "new note". In some
cases, it can be desirable to have a different or even a dynamic default
note title.</p>
<p>For this use case, Trilium (since v0.52) supports <code>#titleTemplate</code>
<a
href="#root/_help_zEY4DaJG4YT5">label</a>. You can create such a label for a given note, assign it a value,
and this value will be used as a default title when creating child notes.
As with other labels, you can make it inheritable to apply recursively,
and you can even place it on the root note to have it applied globally
everywhere.</p>
<p>As an example use case, imagine you collect books you've read in a given
year like this:</p>
<p>When a new note is created, its name is by default "new note". In some
cases, it can be desirable to have a different or even a dynamic default
note title.</p>
<p>For this use case, Trilium (since v0.52) supports <code>#titleTemplate</code>
<a
href="#root/_help_zEY4DaJG4YT5">label</a>. You can create such a label for a given note, assign it a value,
and this value will be used as a default title when creating child notes.
As with other labels, you can make it inheritable to apply recursively,
and you can even place it on the root note to have it applied globally
everywhere.</p>
<p>As an example use case, imagine you collect books you've read in a given
year like this:</p>
<ul>
<li>2022 Books
<ul>
<li>Neal Stephenson: Anathem, 2008</li>
<li>Franz Kafka: Die Verwandlung, 1915</li>
</ul>
</li>
</ul>
<p>Now, to the parent note "2022 Books" you can assign label <code>#titleTemplate="[Author name]: [Book title], [Publication year]"</code>.</p>
<p>And all children of "2022 Books" will be created with initial title "[Author
name]: [Book title], [Publication year]". There's no artificial intelligence
here, the idea is to just prompt you to manually fill in the pieces of
information into the note title by yourself.</p>
<h2>Dynamic value</h2>
<p>The value of <code>#titleTemplate</code> is evaluated at the point of note's
creation as a JavaScript string, which means it can be enriched with the
help of JS string interpolation with dynamic data.</p>
<p>Second variable injected is <code>parentNote</code> which gives access to
the parent <a href="#root/_help_habiZ3HU8Kw8"><code>FNote</code></a>.</p>
<p>See also&nbsp;<a class="reference-link" href="#root/_help_KC1HB96bqqHX">Templates</a>&nbsp;which
provides similar capabilities, including default note's content.</p>
<h3>Examples</h3>
<ul>
<li>Imagine you collect server outage incidents and write some notes. It looks
like this:
<ul>
<li>Incidents
<ul>
<li>2022 Books
<ul>
<li>Neal Stephenson: Anathem, 2008</li>
<li>Franz Kafka: Die Verwandlung, 1915</li>
</ul>
</li>
<li>2022-05-09: System crash</li>
<li>2022-05-15: Backup delay</li>
</ul>
<p>Now, to the parent note "2022 Books" you can assign label <code>#titleTemplate="[Author name]: [Book title], [Publication year]"</code>.</p>
<p>And all children of "2022 Books" will be created with initial title "[Author
name]: [Book title], [Publication year]". There's no artificial intelligence
here, the idea is to just prompt you to manually fill in the pieces of
information into the note title by yourself.</p>
<h2>Dynamic value</h2>
<p>The value of <code>#titleTemplate</code> is evaluated at the point of note's
creation as a JavaScript string, which means it can be enriched with the
help of JS string interpolation with dynamic data.</p>
<p>Second variable injected is <code>parentNote</code> which gives access to
the parent <a href="#root/_help_habiZ3HU8Kw8"><code>FNote</code></a>.</p>
<p>See also&nbsp;<a class="reference-link" href="#root/_help_KC1HB96bqqHX">Templates</a>&nbsp;which
provides similar capabilities, including default note's content.</p>
<h3>Examples</h3>
<ul>
<li>Imagine you collect server outage incidents and write some notes. It looks
like this:
<ul>
<li>Incidents
<ul>
<li>2022-05-09: System crash</li>
<li>2022-05-15: Backup delay</li>
</ul>
</li>
<li>You can automatize the date assignment by assigning a label <code>#titleTemplate="${now.format('YYYY-MM-DD')}: "</code> to
the parent note "Incidents". Whenever a new child note is created, the
title template is evaluated with the injected <a href="https://day.js.org/docs/en/display/format">now</a> object.</li>
</ul>
</li>
<li>To use a parent's attribute in the title of new notes: <code>#titleTemplate="${parentNote.getLabelValue('authorName')}'s literary works"</code>
</li>
<li>To mirror the parent's note title: <code>${parentNote.title}</code>
</li>
</ul>
</div>
</div>
</body>
</html>
</li>
<li>You can automatize the date assignment by assigning a label <code>#titleTemplate="${now.format('YYYY-MM-DD')}: "</code> to
the parent note "Incidents". Whenever a new child note is created, the
title template is evaluated with the injected <a href="https://day.js.org/docs/en/display/format">now</a> object.</li>
</ul>
</li>
<li>To use a parent's attribute in the title of new notes: <code>#titleTemplate="${parentNote.getLabelValue('authorName')}'s literary works"</code>
</li>
<li>To mirror the parent's note title: <code>${parentNote.title}</code>
</li>
</ul>

View File

@@ -1,45 +1,30 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../style.css">
<base target="_parent">
<title data-trilium-title>ETAPI (REST API)</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>ETAPI (REST API)</h1>
<div class="ck-content">
<p>ETAPI is Trilium's public/external REST API. It is available since Trilium
v0.50.</p>
<p>The documentation is in OpenAPI format, available <a href="https://github.com/TriliumNext/Notes/blob/master/src/etapi/etapi.openapi.yaml">here</a>.</p>
<h2>API clients</h2>
<p>As an alternative to calling the API directly, there are client libraries
to simplify this</p>
<ul>
<li><a href="https://github.com/Nriver/trilium-py">trilium-py</a>, you can
use Python to communicate with Trilium.</li>
</ul>
<h2>Authentication</h2>
<p>All operations have to be authenticated using a token. You can get this
token either from Options -&gt; ETAPI or programmatically using the <code>/auth/login</code> REST
call (see the <a href="https://github.com/TriliumNext/Notes/blob/master/src/etapi/etapi.openapi.yaml">spec</a>):</p><pre><code class="language-text-x-trilium-auto">GET https://myserver.com/etapi/app-info
<p>ETAPI is Trilium's public/external REST API. It is available since Trilium
v0.50.</p>
<p>The documentation is in OpenAPI format, available <a href="https://github.com/TriliumNext/Notes/blob/master/src/etapi/etapi.openapi.yaml">here</a>.</p>
<h2>API clients</h2>
<p>As an alternative to calling the API directly, there are client libraries
to simplify this</p>
<ul>
<li><a href="https://github.com/Nriver/trilium-py">trilium-py</a>, you can
use Python to communicate with Trilium.</li>
</ul>
<h2>Authentication</h2>
<p>All operations have to be authenticated using a token. You can get this
token either from Options -&gt; ETAPI or programmatically using the <code>/auth/login</code> REST
call (see the <a href="https://github.com/TriliumNext/Notes/blob/master/src/etapi/etapi.openapi.yaml">spec</a>):</p><pre><code class="language-text-x-trilium-auto">GET https://myserver.com/etapi/app-info
Authorization: ETAPITOKEN</code></pre>
<p>Alternatively, since 0.56 you can also use basic auth format:</p><pre><code class="language-text-x-trilium-auto">GET https://myserver.com/etapi/app-info
<p>Alternatively, since 0.56 you can also use basic auth format:</p><pre><code class="language-text-x-trilium-auto">GET https://myserver.com/etapi/app-info
Authorization: Basic BATOKEN</code></pre>
<ul>
<li>Where <code>BATOKEN = BASE64(username + ':' + password)</code> - this is
a standard Basic Auth serialization</li>
<li>Where <code>username</code> is "etapi"</li>
<li>And <code>password</code> is the generated ETAPI token described above.</li>
</ul>
<p>Basic Auth is meant to be used with tools which support only basic auth.</p>
<h2>Interaction using Bash scripts</h2>
<p>It is possible to write simple Bash scripts to interact with Trilium.
As an example, here's how to obtain the HTML content of a note:</p><pre><code class="language-text-x-trilium-auto">#!/usr/bin/env bash
<ul>
<li>Where <code>BATOKEN = BASE64(username + ':' + password)</code> - this is
a standard Basic Auth serialization</li>
<li>Where <code>username</code> is "etapi"</li>
<li>And <code>password</code> is the generated ETAPI token described above.</li>
</ul>
<p>Basic Auth is meant to be used with tools which support only basic auth.</p>
<h2>Interaction using Bash scripts</h2>
<p>It is possible to write simple Bash scripts to interact with Trilium.
As an example, here's how to obtain the HTML content of a note:</p><pre><code class="language-text-x-trilium-auto">#!/usr/bin/env bash
# Configuration
TOKEN=z1vA4fkGxjOR_ZXLrZeqHEFOv65yV3882iFCRtNIK9k9iWrHliITNSLQ=
@@ -48,15 +33,10 @@ SERVER=http://localhost:8080
# Download a note by ID
NOTE_ID="i6ra4ZshJhgN"
curl "$SERVER/etapi/notes/$NOTE_ID/content" -H "Authorization: $TOKEN" </code></pre>
<p>Make sure to replace the values of:</p>
<ul>
<li><code>TOKEN</code> with your ETAPI token.</li>
<li><code>SERVER</code> with the correct protocol, host name and port to your
Trilium instance.</li>
<li><code>NOTE_ID</code> with an existing note ID to download.</li>
</ul>
</div>
</div>
</body>
</html>
<p>Make sure to replace the values of:</p>
<ul>
<li><code>TOKEN</code> with your ETAPI token.</li>
<li><code>SERVER</code> with the correct protocol, host name and port to your
Trilium instance.</li>
<li><code>NOTE_ID</code> with an existing note ID to download.</li>
</ul>

View File

@@ -1,202 +1,182 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../style.css">
<base target="_parent">
<title data-trilium-title>Hidden Notes</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Hidden Notes</h1>
<div class="ck-content">
<figure class="image image-style-align-right">
<img style="aspect-ratio:263/445;" src="Hidden Notes_image.png" width="263"
height="445">
</figure>
<p>For easy extensibility, a lot of features in Trilium make use of actual
notes to store information as opposed to having them stored in a separate
location in the database. This allows some functions such as&nbsp;<a class="reference-link"
href="#root/_help_zEY4DaJG4YT5">Attributes</a>,&nbsp;<a class="reference-link"
href="#root/_help_Cq5X6iKQop6R">Relations</a>&nbsp;or even&nbsp;<a class="reference-link"
href="#root/_help_eIg8jdvaoNNd">Search</a>&nbsp;and&nbsp;<a class="reference-link"
href="#root/_help_QEAPj01N5f7w">Links</a>&nbsp;to be able to operate on
them.</p>
<p>As the name suggests, these notes are hidden to the user by default to
prevent cluttering the note tree and to prevent them from being accidentally
deleted.</p>
<p>The hidden notes are stored in the user's&nbsp;<a class="reference-link"
href="#root/_help_wX4HbRucYSDD">Database</a>&nbsp;just like normal notes,
but they have a unique&nbsp;<a class="reference-link" href="#root/_help_m1lbrzyKDaRB">Note ID</a>&nbsp;which
allows them to be distinguished from the normal ones.</p>
<h2>Accessing the hidden note tree</h2>
<p>From the&nbsp;<a class="reference-link" href="#root/_help_x3i7MxGccDuM">Global menu</a>,
select <em>Advanced</em><em>Show Hidden Subtree</em>.</p>
<h2>Contents of the hidden note tree</h2>
<p>Here is a brief summary of all the notes within the hidden tree:</p>
<figure
class="table" style="width:100%;">
<table class="ck-table-resized">
<colgroup>
<col style="width:19.93%;">
<col style="width:80.07%;">
</colgroup>
<thead>
<tr>
<th>Note</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="reference-link" href="#root/_hidden/_help__globalNoteMap">Note Map</a>
</td>
<td>
<p>This note is actually opened when the&nbsp;<a class="reference-link" href="#root/_help_bdUJEHsAPYQR">Note Map</a>&nbsp;feature
that is accessed from the&nbsp;<a class="reference-link" href="#root/_help_xYmIYSP6wE3F">Launch Bar</a>.</p>
<p>It is possible to create any child notes in it without any additional
meaning. For example, it can be used to store a list of note maps which
can be linked to from other notes or <a href="#root/_help_u3YFHC9tQlpm">bookmarked</a>.</p>
</td>
</tr>
<tr>
<td><a class="reference-link" href="#root/_hidden/_help__sqlConsole">SQL Console History</a>
</td>
<td>
<p>When SQL queries or commands are executed in the&nbsp;<a class="reference-link"
href="#root/_help_YKWqdJhzi2VY">SQL Console</a>, they are stored here,
grouped by month. Only the query is stored and not the results.</p>
<p>This section can be accessed without going to the hidden tree by simply
going to the&nbsp;<a class="reference-link" href="#root/_help_x3i7MxGccDuM">Global menu</a>&nbsp;and
selecting Advanced → Open SQL Console History.</p>
<p>Notes can be added as children of this tree, but it's generally not recommended
to do so to not interfere with the normal history process.</p>
</td>
</tr>
<tr>
<td><a class="reference-link" href="#root/_hidden/_help__search">Search History</a>
</td>
<td>
<p>Whenever a search is executed from the full&nbsp;<a class="reference-link"
href="#root/_help_eIg8jdvaoNNd">Search</a>, the query will be stored here,
grouped by month. Only the search parameters are stored and not the results
themselves.</p>
<p>This section can be accessed without going to the hidden tree by simply
going to the&nbsp;<a class="reference-link" href="#root/_help_x3i7MxGccDuM">Global menu</a>&nbsp;and
selecting Advanced → Open Search History.</p>
<p>Notes can be added as children of this tree, but it's generally not recommended
to do so to not interfere with the normal history process.</p>
</td>
</tr>
<tr>
<td><a class="reference-link" href="#root/_hidden/_help__bulkAction">Bulk Action</a>
</td>
<td>
<p>This section is used for&nbsp;<a class="reference-link" href="#root/_help_ivYnonVFBxbQ">Bulk Actions</a>.
The last configuration for bulk actions will be stored as part of this
note, each action in its own <code>action</code> label.</p>
<p>Notes can be added as children of this tree, but there won't be any benefit
in doing so.</p>
</td>
</tr>
<tr>
<td><a class="reference-link" href="#root/_hidden/_help__backendLog">Backend Log</a>
</td>
<td>
<p>This note corresponds to the backend log feature (see&nbsp;<a class="reference-link"
href="#root/_help_qzNzp9LYQyPT">Error logs</a>).</p>
<p>This item can be accessed without going to the hidden try by going to
the&nbsp;<a class="reference-link" href="#root/_help_x3i7MxGccDuM">Global menu</a>&nbsp;and
selecting Advanced → Show backend log.</p>
</td>
</tr>
<tr>
<td><a class="reference-link" href="#root/_hidden/_help__userHidden">User Hidden</a>
</td>
<td>This section can be used by <a href="#root/_help_CdNpE2pqjmI6">scripts</a> to
create their own notes that should not be directly visible to the user.
The note can be identified by scripts by its unique ID: <code>_userHidden</code>
</td>
</tr>
<tr>
<td><a class="reference-link" href="#root/_hidden/_help__lbTplRoot">Launch Bar Templates</a>
</td>
<td>
<p>This section contains the templates for the creation of launchers in the&nbsp;
<a
class="reference-link" href="#root/_help_xYmIYSP6wE3F">Launch Bar</a>. It is not possible to create child notes here.</p>
<p>Theoretically some of the notes here can be customized, but there's not
much benefit to be had in doing so.</p>
</td>
</tr>
<tr>
<td><a class="reference-link" href="#root/_hidden/_help__share">Shared Notes</a>
</td>
<td>
<p>This tree lists all of the notes that are <a href="#root/_help_R9pX4DGra2Vt">shared</a> publicly.
It can be useful to track down which notes are shared regardless of their
position in the note tree.</p>
<p>This section can be accessed without going to the hidden tree simply by
going to the&nbsp;<a class="reference-link" href="#root/_help_x3i7MxGccDuM">Global menu</a>&nbsp;and
selecting <em>Show Shared Notes Subtree</em>.</p>
<p>Sub-notes cannot be created here.</p>
</td>
</tr>
<tr>
<td><a class="reference-link" href="#root/_hidden/_help__lbRoot">Launch Bar</a>
</td>
<td>
<p>The tree contains both available and displayed items of the&nbsp;<a class="reference-link"
href="#root/_help_xYmIYSP6wE3F">Launch Bar</a>.</p>
<p>This section can be accessed without going to the hidden tree by:</p>
<ul>
<li>Going to the&nbsp;<a class="reference-link" href="#root/_help_x3i7MxGccDuM">Global menu</a>&nbsp;and
selecting <em>Configure Launchbar</em>.</li>
<li>Right-clicking an empty space on the&nbsp;<a class="reference-link" href="#root/_help_xYmIYSP6wE3F">Launch Bar</a>&nbsp;and
selecting <em>Configure Launchbar</em>.</li>
</ul>
<p>Sub-notes cannot be created here.</p>
</td>
</tr>
<tr>
<td><a class="reference-link" href="#root/_hidden/_help__options">Options</a>
</td>
<td>
<p>This section stores the list of&nbsp;<a class="reference-link" href="#root/_help_4TIF1oA4VQRO">Options</a>.</p>
<p>This section can be accessed without going to the hidden tree by:</p>
<ul>
<li>Going to the&nbsp;<a class="reference-link" href="#root/_help_x3i7MxGccDuM">Global menu</a>&nbsp;and
selecting <em>Options</em>.</li>
<li>Pressing the dedicated Options icon in the&nbsp;<a class="reference-link"
href="#root/_help_xYmIYSP6wE3F">Launch Bar</a>.</li>
</ul>
</td>
</tr>
<tr>
<td><a class="reference-link" href="#root/_hidden/_help__lbMobileRoot">Mobile Launch Bar</a>
</td>
<td>
<p>This is very similar to the <em>Launch Bar</em>, but is dedicated for the
mobile UI only.</p>
<p>Accessing it outside the <em>Launch Bar</em> is the same as the Launch Bar,
but needs to be done so from the mobile interface.</p>
</td>
</tr>
<tr>
<td><a class="reference-link" href="#root/_hidden/_help__help">User Guide</a>
</td>
<td>This is where the note structure for the User Guide is actually stored.
Only the metadata is stored, as the help itself is present as actual files
in the application directory.</td>
</tr>
</tbody>
</table>
</figure>
</div>
</div>
</body>
</html>
<figure class="image image-style-align-right">
<img style="aspect-ratio:263/445;" src="Hidden Notes_image.png" width="263"
height="445">
</figure>
<p>For easy extensibility, a lot of features in Trilium make use of actual
notes to store information as opposed to having them stored in a separate
location in the database. This allows some functions such as&nbsp;<a class="reference-link"
href="#root/_help_zEY4DaJG4YT5">Attributes</a>,&nbsp;<a class="reference-link"
href="#root/_help_Cq5X6iKQop6R">Relations</a>&nbsp;or even&nbsp;<a class="reference-link"
href="#root/_help_eIg8jdvaoNNd">Search</a>&nbsp;and&nbsp;<a class="reference-link"
href="#root/_help_QEAPj01N5f7w">Links</a>&nbsp;to be able to operate on
them.</p>
<p>As the name suggests, these notes are hidden to the user by default to
prevent cluttering the note tree and to prevent them from being accidentally
deleted.</p>
<p>The hidden notes are stored in the user's&nbsp;<a class="reference-link"
href="#root/_help_wX4HbRucYSDD">Database</a>&nbsp;just like normal notes,
but they have a unique&nbsp;<a class="reference-link" href="#root/_help_m1lbrzyKDaRB">Note ID</a>&nbsp;which
allows them to be distinguished from the normal ones.</p>
<h2>Accessing the hidden note tree</h2>
<p>From the&nbsp;<a class="reference-link" href="#root/_help_x3i7MxGccDuM">Global menu</a>,
select <em>Advanced</em><em>Show Hidden Subtree</em>.</p>
<h2>Contents of the hidden note tree</h2>
<p>Here is a brief summary of all the notes within the hidden tree:</p>
<figure
class="table" style="width:100%;">
<table class="ck-table-resized">
<colgroup>
<col style="width:19.93%;">
<col style="width:80.07%;">
</colgroup>
<thead>
<tr>
<th>Note</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="reference-link" href="#root/_hidden/_help__globalNoteMap">Note Map</a>
</td>
<td>
<p>This note is actually opened when the&nbsp;<a class="reference-link" href="#root/_help_bdUJEHsAPYQR">Note Map</a>&nbsp;feature
that is accessed from the&nbsp;<a class="reference-link" href="#root/_help_xYmIYSP6wE3F">Launch Bar</a>.</p>
<p>It is possible to create any child notes in it without any additional
meaning. For example, it can be used to store a list of note maps which
can be linked to from other notes or <a href="#root/_help_u3YFHC9tQlpm">bookmarked</a>.</p>
</td>
</tr>
<tr>
<td><a class="reference-link" href="#root/_hidden/_help__sqlConsole">SQL Console History</a>
</td>
<td>
<p>When SQL queries or commands are executed in the&nbsp;<a class="reference-link"
href="#root/_help_YKWqdJhzi2VY">SQL Console</a>, they are stored here,
grouped by month. Only the query is stored and not the results.</p>
<p>This section can be accessed without going to the hidden tree by simply
going to the&nbsp;<a class="reference-link" href="#root/_help_x3i7MxGccDuM">Global menu</a>&nbsp;and
selecting Advanced → Open SQL Console History.</p>
<p>Notes can be added as children of this tree, but it's generally not recommended
to do so to not interfere with the normal history process.</p>
</td>
</tr>
<tr>
<td><a class="reference-link" href="#root/_hidden/_help__search">Search History</a>
</td>
<td>
<p>Whenever a search is executed from the full&nbsp;<a class="reference-link"
href="#root/_help_eIg8jdvaoNNd">Search</a>, the query will be stored here,
grouped by month. Only the search parameters are stored and not the results
themselves.</p>
<p>This section can be accessed without going to the hidden tree by simply
going to the&nbsp;<a class="reference-link" href="#root/_help_x3i7MxGccDuM">Global menu</a>&nbsp;and
selecting Advanced → Open Search History.</p>
<p>Notes can be added as children of this tree, but it's generally not recommended
to do so to not interfere with the normal history process.</p>
</td>
</tr>
<tr>
<td><a class="reference-link" href="#root/_hidden/_help__bulkAction">Bulk Action</a>
</td>
<td>
<p>This section is used for&nbsp;<a class="reference-link" href="#root/_help_ivYnonVFBxbQ">Bulk Actions</a>.
The last configuration for bulk actions will be stored as part of this
note, each action in its own <code>action</code> label.</p>
<p>Notes can be added as children of this tree, but there won't be any benefit
in doing so.</p>
</td>
</tr>
<tr>
<td><a class="reference-link" href="#root/_hidden/_help__backendLog">Backend Log</a>
</td>
<td>
<p>This note corresponds to the backend log feature (see&nbsp;<a class="reference-link"
href="#root/_help_qzNzp9LYQyPT">Error logs</a>).</p>
<p>This item can be accessed without going to the hidden try by going to
the&nbsp;<a class="reference-link" href="#root/_help_x3i7MxGccDuM">Global menu</a>&nbsp;and
selecting Advanced → Show backend log.</p>
</td>
</tr>
<tr>
<td><a class="reference-link" href="#root/_hidden/_help__userHidden">User Hidden</a>
</td>
<td>This section can be used by <a href="#root/_help_CdNpE2pqjmI6">scripts</a> to
create their own notes that should not be directly visible to the user.
The note can be identified by scripts by its unique ID: <code>_userHidden</code>
</td>
</tr>
<tr>
<td><a class="reference-link" href="#root/_hidden/_help__lbTplRoot">Launch Bar Templates</a>
</td>
<td>
<p>This section contains the templates for the creation of launchers in the&nbsp;
<a
class="reference-link" href="#root/_help_xYmIYSP6wE3F">Launch Bar</a>. It is not possible to create child notes here.</p>
<p>Theoretically some of the notes here can be customized, but there's not
much benefit to be had in doing so.</p>
</td>
</tr>
<tr>
<td><a class="reference-link" href="#root/_hidden/_help__share">Shared Notes</a>
</td>
<td>
<p>This tree lists all of the notes that are <a href="#root/_help_R9pX4DGra2Vt">shared</a> publicly.
It can be useful to track down which notes are shared regardless of their
position in the note tree.</p>
<p>This section can be accessed without going to the hidden tree simply by
going to the&nbsp;<a class="reference-link" href="#root/_help_x3i7MxGccDuM">Global menu</a>&nbsp;and
selecting <em>Show Shared Notes Subtree</em>.</p>
<p>Sub-notes cannot be created here.</p>
</td>
</tr>
<tr>
<td><a class="reference-link" href="#root/_hidden/_help__lbRoot">Launch Bar</a>
</td>
<td>
<p>The tree contains both available and displayed items of the&nbsp;<a class="reference-link"
href="#root/_help_xYmIYSP6wE3F">Launch Bar</a>.</p>
<p>This section can be accessed without going to the hidden tree by:</p>
<ul>
<li>Going to the&nbsp;<a class="reference-link" href="#root/_help_x3i7MxGccDuM">Global menu</a>&nbsp;and
selecting <em>Configure Launchbar</em>.</li>
<li>Right-clicking an empty space on the&nbsp;<a class="reference-link" href="#root/_help_xYmIYSP6wE3F">Launch Bar</a>&nbsp;and
selecting <em>Configure Launchbar</em>.</li>
</ul>
<p>Sub-notes cannot be created here.</p>
</td>
</tr>
<tr>
<td><a class="reference-link" href="#root/_hidden/_help__options">Options</a>
</td>
<td>
<p>This section stores the list of&nbsp;<a class="reference-link" href="#root/_help_4TIF1oA4VQRO">Options</a>.</p>
<p>This section can be accessed without going to the hidden tree by:</p>
<ul>
<li>Going to the&nbsp;<a class="reference-link" href="#root/_help_x3i7MxGccDuM">Global menu</a>&nbsp;and
selecting <em>Options</em>.</li>
<li>Pressing the dedicated Options icon in the&nbsp;<a class="reference-link"
href="#root/_help_xYmIYSP6wE3F">Launch Bar</a>.</li>
</ul>
</td>
</tr>
<tr>
<td><a class="reference-link" href="#root/_hidden/_help__lbMobileRoot">Mobile Launch Bar</a>
</td>
<td>
<p>This is very similar to the <em>Launch Bar</em>, but is dedicated for the
mobile UI only.</p>
<p>Accessing it outside the <em>Launch Bar</em> is the same as the Launch Bar,
but needs to be done so from the mobile interface.</p>
</td>
</tr>
<tr>
<td><a class="reference-link" href="#root/_hidden/_help__help">User Guide</a>
</td>
<td>This is where the note structure for the User Guide is actually stored.
Only the metadata is stored, as the help itself is present as actual files
in the application directory.</td>
</tr>
</tbody>
</table>
</figure>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

View File

@@ -1,46 +1,26 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../style.css">
<base target="_parent">
<title data-trilium-title>Note ID</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Note ID</h1>
<div class="ck-content">
<p>Whereas some applications use file names to uniquely identify notes, Trilium
uses the concept of Note ID.</p>
<p>Generally, the Note ID is a 12-character long alphanumeric sequence (including
both lower and upper case letter) that is randomly generated for each new
note.</p>
<h2>How does the import/export affect the note IDs</h2>
<p>When notes are exported, their note ID is kept in the metadata of the
export. However when they are imported back in, a new note ID is generated
for all the notes. This also includes other entities that are part of the
import/export process such as&nbsp;<a class="reference-link" href="#root/_help_0vhv7lsOLy82">Attachments</a>.</p>
<h2>Note collisions</h2>
<p>Since the Note ID is a fixed-width randomly generated number, due to the
<a
href="https://en.wikipedia.org/wiki/Pigeonhole_principle">pigeonhole principle</a>, there is a possibility that a newly created
note will have the same ID as an existing note.</p>
<p>Since the note ID is alphanumeric and the length is 12 we have&nbsp;
<span
class="math-tex">\(62^{12}\)</span>&nbsp;unique IDs. However since we are generating them
randomly, we can use a collision calculator such as the one for <a href="https://alex7kom.github.io/nano-nanoid-cc/?alphabet=0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz&amp;size=12&amp;speed=1000&amp;speedUnit=hour">Nano ID</a> to
determine that we'd need to create 1000 notes per hour every hour for 9
centuries in order to have at least 1% probability of a note collision.</p>
<p>As such, Trilium does not take any explicit action against potential note
collisions, similar to other software that makes uses of unique hashes
such as <a href="https://stackoverflow.com/questions/10434326/hash-collision-in-git">Git</a>.
If one would theoretically occur, what would most likely happen is that
the existing note will be replaced by the new one.</p>
</div>
</div>
</body>
</html>
<p>Whereas some applications use file names to uniquely identify notes, Trilium
uses the concept of Note ID.</p>
<p>Generally, the Note ID is a 12-character long alphanumeric sequence (including
both lower and upper case letter) that is randomly generated for each new
note.</p>
<h2>How does the import/export affect the note IDs</h2>
<p>When notes are exported, their note ID is kept in the metadata of the
export. However when they are imported back in, a new note ID is generated
for all the notes. This also includes other entities that are part of the
import/export process such as&nbsp;<a class="reference-link" href="#root/_help_0vhv7lsOLy82">Attachments</a>.</p>
<h2>Note collisions</h2>
<p>Since the Note ID is a fixed-width randomly generated number, due to the
<a
href="https://en.wikipedia.org/wiki/Pigeonhole_principle">pigeonhole principle</a>, there is a possibility that a newly created
note will have the same ID as an existing note.</p>
<p>Since the note ID is alphanumeric and the length is 12 we have&nbsp;
<span
class="math-tex">\(62^{12}\)</span>&nbsp;unique IDs. However since we are generating them
randomly, we can use a collision calculator such as the one for <a href="https://alex7kom.github.io/nano-nanoid-cc/?alphabet=0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz&amp;size=12&amp;speed=1000&amp;speedUnit=hour">Nano ID</a> to
determine that we'd need to create 1000 notes per hour every hour for 9
centuries in order to have at least 1% probability of a note collision.</p>
<p>As such, Trilium does not take any explicit action against potential note
collisions, similar to other software that makes uses of unique hashes
such as <a href="https://stackoverflow.com/questions/10434326/hash-collision-in-git">Git</a>.
If one would theoretically occur, what would most likely happen is that
the existing note will be replaced by the new one.</p>

View File

@@ -1,50 +1,30 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../style.css">
<base target="_parent">
<title data-trilium-title>Note Map (Link map, Tree map)</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Note Map (Link map, Tree map)</h1>
<div class="ck-content">
<p>Note map is a visualisation of connections between notes.</p>
<p>This provides an insight into a structure ("web") of notes.</p>
<p>There are two types of note map:</p>
<ul>
<li>Link Map, which shows relations between notes.</li>
<li>Note Map, which shows the hierarchical tree structure.</li>
</ul>
<h2>Link Map</h2>
<p>Shows <a href="#root/_help_zEY4DaJG4YT5">relations</a> between notes:</p>
<p>
<img src="1_Note Map (Link map, Tree m.png">
</p>
<h2>Tree Map</h2>
<p>Shows hierarchical map of notes:</p>
<p>
<img src="Note Map (Link map, Tree m.png">
</p>
<h2>Dedicated note type</h2>
<p>Apart from the note map feature which can be accessed from any note, it
is also possible to create a dedicated note which will display the relations
in full screen. See&nbsp;<a href="#root/_help_bdUJEHsAPYQR">Note Map</a>&nbsp;for
more information.</p>
<h2>See also</h2>
<p><a href="#root/_help_iRwzGnHPzonm">Relation map</a> is a similar concept,
with some differences:</p>
<ul>
<li>note map is automatically generated while relation map must be created
manually</li>
<li>relation map is a type of note while a link map is just virtual visualization</li>
</ul>
</div>
</div>
</body>
</html>
<p>Note map is a visualisation of connections between notes.</p>
<p>This provides an insight into a structure ("web") of notes.</p>
<p>There are two types of note map:</p>
<ul>
<li>Link Map, which shows relations between notes.</li>
<li>Note Map, which shows the hierarchical tree structure.</li>
</ul>
<h2>Link Map</h2>
<p>Shows <a href="#root/_help_zEY4DaJG4YT5">relations</a> between notes:</p>
<p>
<img src="1_Note Map (Link map, Tree m.png">
</p>
<h2>Tree Map</h2>
<p>Shows hierarchical map of notes:</p>
<p>
<img src="Note Map (Link map, Tree m.png">
</p>
<h2>Dedicated note type</h2>
<p>Apart from the note map feature which can be accessed from any note, it
is also possible to create a dedicated note which will display the relations
in full screen. See&nbsp;<a href="#root/_help_bdUJEHsAPYQR">Note Map</a>&nbsp;for
more information.</p>
<h2>See also</h2>
<p><a href="#root/_help_iRwzGnHPzonm">Relation map</a> is a similar concept,
with some differences:</p>
<ul>
<li>note map is automatically generated while relation map must be created
manually</li>
<li>relation map is a type of note while a link map is just virtual visualization</li>
</ul>

View File

@@ -1,49 +1,34 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../style.css">
<base target="_parent">
<title data-trilium-title>Note source</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Note source</h1>
<div class="ck-content">
<h2>Understanding the source code of the different notes</h2>
<p>Internally, the structure of the content of each note is different based
on the&nbsp;<a class="reference-link" href="#root/_help_KSZ04uQ2D1St">Note Types</a>.</p>
<p>For example:</p>
<ul>
<li><a class="reference-link" href="#root/_help_iPIMuisry3hd">Text</a>&nbsp;notes&nbsp;are
represented internally as HTML, using the&nbsp;<a class="reference-link"
href="#root/_help_MI26XDLSAlCD">CKEditor</a>&nbsp;representation. Note
that due to the custom plugins, some HTML elements are specific to Trilium
only, for example the admonitions.</li>
<li><a class="reference-link" href="#root/_help_6f9hih2hXXZk">Code</a>&nbsp;notes&nbsp;are
plain text and are represented internally as-is.</li>
<li><a class="reference-link" href="#root/_help_81SGnPGMk7Xc">Geo Map</a>&nbsp;notes
contain only minimal information (viewport, zoom) as a JSON.</li>
<li><a class="reference-link" href="#root/_help_grjYqerjn243">Canvas</a>&nbsp;notes
are represented as JSON, with Trilium's own information alongside with&nbsp;
<a
class="reference-link" href="#root/_help_H0mM1lTxF9JI">Excalidraw</a>'s internal JSON representation format.</li>
<li><a class="reference-link" href="#root/_help_gBbsAeiuUxI5">Mind Map</a>&nbsp;notes
are represented as JSON, with the internal format of&nbsp;<a class="reference-link"
href="#root/_help_N4IDkixaDG9C">MindElixir</a>.</li>
</ul>
<p>Note that some information is also stored as&nbsp;<a class="reference-link"
href="#root/_help_0vhv7lsOLy82">Attachments</a>. For example&nbsp;<a class="reference-link"
href="#root/_help_grjYqerjn243">Canvas</a>&nbsp;notes use the attachments
feature to store the custom libraries, and alongside with&nbsp;<a class="reference-link"
href="#root/_help_gBbsAeiuUxI5">Mind Map</a>&nbsp;and other similar note
types it stores an SVG representation of the content for use in other features
such as including in other notes, shared notes, etc.</p>
<p>Here's part of the HTML representation of this note, as it's stored in
the database (but prettified).</p><pre><code class="language-text-x-trilium-auto">&lt;h2&gt;
<h2>Understanding the source code of the different notes</h2>
<p>Internally, the structure of the content of each note is different based
on the&nbsp;<a class="reference-link" href="#root/_help_KSZ04uQ2D1St">Note Types</a>.</p>
<p>For example:</p>
<ul>
<li><a class="reference-link" href="#root/_help_iPIMuisry3hd">Text</a>&nbsp;notes&nbsp;are
represented internally as HTML, using the&nbsp;<a class="reference-link"
href="#root/_help_MI26XDLSAlCD">CKEditor</a>&nbsp;representation. Note
that due to the custom plugins, some HTML elements are specific to Trilium
only, for example the admonitions.</li>
<li><a class="reference-link" href="#root/_help_6f9hih2hXXZk">Code</a>&nbsp;notes&nbsp;are
plain text and are represented internally as-is.</li>
<li><a class="reference-link" href="#root/_help_81SGnPGMk7Xc">Geo Map</a>&nbsp;notes
contain only minimal information (viewport, zoom) as a JSON.</li>
<li><a class="reference-link" href="#root/_help_grjYqerjn243">Canvas</a>&nbsp;notes
are represented as JSON, with Trilium's own information alongside with&nbsp;
<a
class="reference-link" href="#root/_help_H0mM1lTxF9JI">Excalidraw</a>'s internal JSON representation format.</li>
<li><a class="reference-link" href="#root/_help_gBbsAeiuUxI5">Mind Map</a>&nbsp;notes
are represented as JSON, with the internal format of&nbsp;<a class="reference-link"
href="#root/_help_N4IDkixaDG9C">MindElixir</a>.</li>
</ul>
<p>Note that some information is also stored as&nbsp;<a class="reference-link"
href="#root/_help_0vhv7lsOLy82">Attachments</a>. For example&nbsp;<a class="reference-link"
href="#root/_help_grjYqerjn243">Canvas</a>&nbsp;notes use the attachments
feature to store the custom libraries, and alongside with&nbsp;<a class="reference-link"
href="#root/_help_gBbsAeiuUxI5">Mind Map</a>&nbsp;and other similar note
types it stores an SVG representation of the content for use in other features
such as including in other notes, shared notes, etc.</p>
<p>Here's part of the HTML representation of this note, as it's stored in
the database (but prettified).</p><pre><code class="language-text-x-trilium-auto">&lt;h2&gt;
Understanding the source code of the different notes
&lt;/h2&gt;
&lt;p&gt;
@@ -53,36 +38,31 @@
&lt;/a&gt;
.
&lt;/p&gt;</code></pre>
<h2>Viewing the source code</h2>
<p>It is possible to view the source code of a note by pressing the contextual
menu in&nbsp;<a class="reference-link" href="#root/_help_8YBEPzcpUgxw">Note buttons</a>&nbsp;and
selecting <em>Note source</em>.</p>
<p>
<img src="Note source_image.png">
</p>
<p>The source code will be displayed in a new tab.</p>
<p>For some note types, such as text notes, the source code is also formatted
in order to be more easily readable.</p>
<h2>Modifying the source code</h2>
<p>It is possible to modify the source code of a note directly, however not
via the <em>Note source</em> functionality.&nbsp;</p>
<p>To do so:</p>
<ol>
<li>Change the note type from the real note type (e.g. Canvas, Geo Type) to
Code (plain text) or the corresponding format such as JSON or HTML.</li>
<li>Confirm the warning about changing the note type.</li>
<li>The source code will appear, make the necessary modifications.</li>
<li>Change the note type back to the real note type.</li>
</ol>
<aside class="admonition warning">
<p>Depending on the changes made, there is a risk that the note will not
render properly. It's best to save a revision before making any big changes.</p>
<p>If the note does not render properly, modify the source code again or
revert to a prior revision. Since the error handling for unexpected changes
might not always be perfect, it be required to refresh the application.</p>
</aside>
</div>
</div>
</body>
</html>
<h2>Viewing the source code</h2>
<p>It is possible to view the source code of a note by pressing the contextual
menu in&nbsp;<a class="reference-link" href="#root/_help_8YBEPzcpUgxw">Note buttons</a>&nbsp;and
selecting <em>Note source</em>.</p>
<p>
<img src="Note source_image.png">
</p>
<p>The source code will be displayed in a new tab.</p>
<p>For some note types, such as text notes, the source code is also formatted
in order to be more easily readable.</p>
<h2>Modifying the source code</h2>
<p>It is possible to modify the source code of a note directly, however not
via the <em>Note source</em> functionality.&nbsp;</p>
<p>To do so:</p>
<ol>
<li>Change the note type from the real note type (e.g. Canvas, Geo Type) to
Code (plain text) or the corresponding format such as JSON or HTML.</li>
<li>Confirm the warning about changing the note type.</li>
<li>The source code will appear, make the necessary modifications.</li>
<li>Change the note type back to the real note type.</li>
</ol>
<aside class="admonition warning">
<p>Depending on the changes made, there is a risk that the note will not
render properly. It's best to save a revision before making any big changes.</p>
<p>If the note does not render properly, modify the source code again or
revert to a prior revision. Since the error handling for unexpected changes
might not always be perfect, it be required to refresh the application.</p>
</aside>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -1,212 +1,192 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../style.css">
<base target="_parent">
<title data-trilium-title>Sharing</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Sharing</h1>
<div class="ck-content">
<p>Trilium allows you to share selected notes as <strong>publicly accessible</strong> read-only
documents. This feature is particularly useful for publishing content directly
from your Trilium notes, making it accessible to others online.</p>
<h2>Prerequisites</h2>
<p>To use the sharing feature, you must have a&nbsp;<a class="reference-link"
href="#root/_help_WOcw2SLH6tbX">Server Installation</a>&nbsp;of Trilium.
This is necessary because the notes will be hosted from the server.</p>
<h2>How to Share a Note</h2>
<ol>
<li>
<p><strong>Enable Sharing</strong>: To share a note, toggle the <code>Shared</code> switch
within the note's interface. Once sharing is enabled, an URL will appear,
which you can click to access the shared note.</p>
<p>
<img src="Sharing_share-single-note.png" alt="Share Note">
</p>
</li>
<li>
<p><strong>Access the Shared Note</strong>: The link provided will open the
note in your browser. If your server is not configured with a public IP,
the URL will refer to <code>localhost (127.0.0.1)</code>.</p>
<p>
<img src="Sharing_share-single-note-.png" alt="Shared Note Example">
</p>
</li>
</ol>
<h2>Sharing a Note Subtree</h2>
<p>When you share a note, you actually share the entire subtree of notes
beneath it. If the note has child notes, they will also be included in
the shared content. For example, sharing the "Formatting" subtree will
display a page with basic navigation for exploring all the notes within
that subtree.</p>
<p>
<img src="Sharing_share-multiple-not.png" alt="Shared Subtree Example">
</p>
<h2>Viewing All Shared Notes</h2>
<p>You can view a list of all shared notes by clicking on "Show Shared Notes
Subtree." This allows you to manage and navigate through all the notes
you have made public.</p>
<h2>Security Considerations</h2>
<p>Shared notes are published on the open internet and can be accessed by
anyone with the URL. The URL's randomness does not provide security, so
it is crucial not to share sensitive information through this feature.</p>
<h3>Password Protection</h3>
<p>To protect shared notes with a username and password, you can use the <code>#shareCredentials</code> attribute.
Add this label to the note with the format <code>#shareCredentials="username:password"</code>.
To protect an entire subtree, make sure the label is <a href="#root/_help_bwZpz2ajCEwO">inheritable</a>.</p>
<h2>Advanced Sharing Options</h2>
<h3>Customizing the Appearance of Shared Notes</h3>
<p>The default shared page is basic in design, but you can customize it using
your own CSS:</p>
<ul>
<li><strong>Custom CSS</strong>: Link a CSS&nbsp;<a class="reference-link"
href="#root/_help_6f9hih2hXXZk">Code</a>&nbsp;note to the shared page by
adding a <code>~shareCss</code> relation to the note. If you want this style
to apply to the entire subtree, make the label inheritable. You can hide
the CSS code note from the tree navigation by adding the <code>#shareHiddenFromTree</code> label.</li>
<li><strong>Omitting Default CSS</strong>: For extensive styling changes,
use the <code>#shareOmitDefaultCss</code> label to avoid conflicts with Trilium's
<a
href="#root/_help_Wy267RK4M69c">default stylesheet</a>.</li>
</ul>
<h3>Adding JavaScript</h3>
<p>You can inject custom JavaScript into the shared note using the <code>~shareJs</code> relation.
This allows you to access note attributes or traverse the note tree using
the <code>fetchNote()</code> API, which retrieves note data based on its
ID.</p>
<p>Example:</p><pre><code class="language-application-javascript-env-backend">const currentNote = await fetchNote();
<p>Trilium allows you to share selected notes as <strong>publicly accessible</strong> read-only
documents. This feature is particularly useful for publishing content directly
from your Trilium notes, making it accessible to others online.</p>
<h2>Prerequisites</h2>
<p>To use the sharing feature, you must have a&nbsp;<a class="reference-link"
href="#root/_help_WOcw2SLH6tbX">Server Installation</a>&nbsp;of Trilium.
This is necessary because the notes will be hosted from the server.</p>
<h2>How to Share a Note</h2>
<ol>
<li>
<p><strong>Enable Sharing</strong>: To share a note, toggle the <code>Shared</code> switch
within the note's interface. Once sharing is enabled, an URL will appear,
which you can click to access the shared note.</p>
<p>
<img src="Sharing_share-single-note.png" alt="Share Note">
</p>
</li>
<li>
<p><strong>Access the Shared Note</strong>: The link provided will open the
note in your browser. If your server is not configured with a public IP,
the URL will refer to <code>localhost (127.0.0.1)</code>.</p>
<p>
<img src="Sharing_share-single-note-.png" alt="Shared Note Example">
</p>
</li>
</ol>
<h2>Sharing a Note Subtree</h2>
<p>When you share a note, you actually share the entire subtree of notes
beneath it. If the note has child notes, they will also be included in
the shared content. For example, sharing the "Formatting" subtree will
display a page with basic navigation for exploring all the notes within
that subtree.</p>
<p>
<img src="Sharing_share-multiple-not.png" alt="Shared Subtree Example">
</p>
<h2>Viewing All Shared Notes</h2>
<p>You can view a list of all shared notes by clicking on "Show Shared Notes
Subtree." This allows you to manage and navigate through all the notes
you have made public.</p>
<h2>Security Considerations</h2>
<p>Shared notes are published on the open internet and can be accessed by
anyone with the URL. The URL's randomness does not provide security, so
it is crucial not to share sensitive information through this feature.</p>
<h3>Password Protection</h3>
<p>To protect shared notes with a username and password, you can use the <code>#shareCredentials</code> attribute.
Add this label to the note with the format <code>#shareCredentials="username:password"</code>.
To protect an entire subtree, make sure the label is <a href="#root/_help_bwZpz2ajCEwO">inheritable</a>.</p>
<h2>Advanced Sharing Options</h2>
<h3>Customizing the Appearance of Shared Notes</h3>
<p>The default shared page is basic in design, but you can customize it using
your own CSS:</p>
<ul>
<li><strong>Custom CSS</strong>: Link a CSS&nbsp;<a class="reference-link"
href="#root/_help_6f9hih2hXXZk">Code</a>&nbsp;note to the shared page by
adding a <code>~shareCss</code> relation to the note. If you want this style
to apply to the entire subtree, make the label inheritable. You can hide
the CSS code note from the tree navigation by adding the <code>#shareHiddenFromTree</code> label.</li>
<li><strong>Omitting Default CSS</strong>: For extensive styling changes,
use the <code>#shareOmitDefaultCss</code> label to avoid conflicts with Trilium's
<a
href="#root/_help_Wy267RK4M69c">default stylesheet</a>.</li>
</ul>
<h3>Adding JavaScript</h3>
<p>You can inject custom JavaScript into the shared note using the <code>~shareJs</code> relation.
This allows you to access note attributes or traverse the note tree using
the <code>fetchNote()</code> API, which retrieves note data based on its
ID.</p>
<p>Example:</p><pre><code class="language-application-javascript-env-backend">const currentNote = await fetchNote();
const parentNote = await fetchNote(currentNote.parentNoteIds[0]);
for (const attr of parentNote.attributes) {
console.log(attr.type, attr.name, attr.value);
}</code></pre>
<h3>Creating Human-Readable URL Aliases</h3>
<p>Shared notes typically have URLs like <code>http://domain.tld/share/knvU8aJy4dJ7</code>,
where the last part is the note's ID. You can make these URLs more user-friendly
by adding the <code>#shareAlias</code> label to individual notes (e.g., <code>#shareAlias=highlighting</code>).
This will change the URL to <code>http://domain.tld/share/highlighting</code>.</p>
<p><strong>Important</strong>:</p>
<ol>
<li>Ensure that aliases are unique.</li>
<li>Using slashes (<code>/</code>) within aliases to create subpaths is not
supported.</li>
</ol>
<h3>Viewing and Managing Shared Notes</h3>
<p>All shared notes are grouped under an automatically managed "Shared Notes"
section. From here, you can view, share, or unshare notes by moving or
cloning them within this section.</p>
<p>
<img src="Sharing_shared-list.png" alt="Shared Notes List">
</p>
<h3>Setting a Custom Favicon</h3>
<p>To customize the favicon for your shared pages, create a relation <code>~shareFavicon</code> pointing
to a file note containing the favicon (e.g., in <code>.ico</code> format).</p>
<h3>Sharing a Note as the Root</h3>
<p>You can designate a specific note or folder as the root of your shared
content by adding the <code>#shareRoot</code> label. This note will be linked
when visiting <code>[http://domain.tld/share](http://domain/share)</code>,
making it easier to use Trilium as a fully-fledged website. Consider combining
this with the <code>#shareIndex</code> label, which will display a list of
all shared notes.</p>
<h2>Limitations</h2>
<p>While the sharing feature is powerful, it has some limitations:</p>
<ul>
<li><strong>No Relation Map Support</strong>
</li>
<li><strong>Book Notes</strong>: Only show a list of child notes.</li>
<li><strong>Code Notes</strong>: No syntax highlighting.</li>
<li><strong>Static Note Tree</strong>
</li>
<li><strong>Protected Notes</strong>: Cannot be shared.</li>
<li><strong>Include Notes</strong>: Not supported.</li>
</ul>
<p>Some of these limitations may be addressed in future updates.</p>
<h2>Attribute reference</h2>
<figure class="table">
<table>
<thead>
<tr>
<th>Attribute</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>shareHiddenFromTree</code>
</td>
<td>this note is hidden from left navigation tree, but still accessible with
its URL</td>
</tr>
<tr>
<td><code>shareExternalLink</code>
</td>
<td>note will act as a link to an external website in the share tree</td>
</tr>
<tr>
<td><code>shareAlias</code>
</td>
<td>define an alias using which the note will be available under <code>https://your_trilium_host/share/[your_alias]</code>
</td>
</tr>
<tr>
<td><code>shareOmitDefaultCss</code>
</td>
<td>default share page CSS will be omitted. Use when you make extensive styling
changes.</td>
</tr>
<tr>
<td><code>shareRoot</code>
</td>
<td>marks note which is served on /share root.</td>
</tr>
<tr>
<td><code>shareDescription</code>
</td>
<td>define text to be added to the HTML meta tag for description</td>
</tr>
<tr>
<td><code>shareRaw</code>
</td>
<td>Note will be served in its raw format, without HTML wrapper. See also&nbsp;
<a
class="reference-link" href="#root/_help_Qjt68inQ2bRj">Serving directly the content of a note</a>&nbsp;for an alternative method
without setting an attribute.</td>
</tr>
<tr>
<td><code>shareDisallowRobotIndexing</code>
</td>
<td>
<p>Indicates to web crawlers that the page should not be indexed of this
note by:</p>
<ul>
<li>Setting the <code>X-Robots-Tag: noindex</code> HTTP header.</li>
<li>Setting the <code>noindex, follow</code> meta tag.</li>
</ul>
</td>
</tr>
<tr>
<td><code>shareCredentials</code>
</td>
<td>require credentials to access this shared note. Value is expected to be
in format <code>username:password</code>. Don't forget to make this inheritable
to apply to child-notes/images.</td>
</tr>
<tr>
<td><code>shareIndex</code>
</td>
<td>Note with this label will list all roots of shared notes.</td>
</tr>
</tbody>
</table>
</figure>
</div>
</div>
</body>
</html>
<h3>Creating Human-Readable URL Aliases</h3>
<p>Shared notes typically have URLs like <code>http://domain.tld/share/knvU8aJy4dJ7</code>,
where the last part is the note's ID. You can make these URLs more user-friendly
by adding the <code>#shareAlias</code> label to individual notes (e.g., <code>#shareAlias=highlighting</code>).
This will change the URL to <code>http://domain.tld/share/highlighting</code>.</p>
<p><strong>Important</strong>:</p>
<ol>
<li>Ensure that aliases are unique.</li>
<li>Using slashes (<code>/</code>) within aliases to create subpaths is not
supported.</li>
</ol>
<h3>Viewing and Managing Shared Notes</h3>
<p>All shared notes are grouped under an automatically managed "Shared Notes"
section. From here, you can view, share, or unshare notes by moving or
cloning them within this section.</p>
<p>
<img src="Sharing_shared-list.png" alt="Shared Notes List">
</p>
<h3>Setting a Custom Favicon</h3>
<p>To customize the favicon for your shared pages, create a relation <code>~shareFavicon</code> pointing
to a file note containing the favicon (e.g., in <code>.ico</code> format).</p>
<h3>Sharing a Note as the Root</h3>
<p>You can designate a specific note or folder as the root of your shared
content by adding the <code>#shareRoot</code> label. This note will be linked
when visiting <code>[http://domain.tld/share](http://domain/share)</code>,
making it easier to use Trilium as a fully-fledged website. Consider combining
this with the <code>#shareIndex</code> label, which will display a list of
all shared notes.</p>
<h2>Limitations</h2>
<p>While the sharing feature is powerful, it has some limitations:</p>
<ul>
<li><strong>No Relation Map Support</strong>
</li>
<li><strong>Book Notes</strong>: Only show a list of child notes.</li>
<li><strong>Code Notes</strong>: No syntax highlighting.</li>
<li><strong>Static Note Tree</strong>
</li>
<li><strong>Protected Notes</strong>: Cannot be shared.</li>
<li><strong>Include Notes</strong>: Not supported.</li>
</ul>
<p>Some of these limitations may be addressed in future updates.</p>
<h2>Attribute reference</h2>
<figure class="table">
<table>
<thead>
<tr>
<th>Attribute</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>shareHiddenFromTree</code>
</td>
<td>this note is hidden from left navigation tree, but still accessible with
its URL</td>
</tr>
<tr>
<td><code>shareExternalLink</code>
</td>
<td>note will act as a link to an external website in the share tree</td>
</tr>
<tr>
<td><code>shareAlias</code>
</td>
<td>define an alias using which the note will be available under <code>https://your_trilium_host/share/[your_alias]</code>
</td>
</tr>
<tr>
<td><code>shareOmitDefaultCss</code>
</td>
<td>default share page CSS will be omitted. Use when you make extensive styling
changes.</td>
</tr>
<tr>
<td><code>shareRoot</code>
</td>
<td>marks note which is served on /share root.</td>
</tr>
<tr>
<td><code>shareDescription</code>
</td>
<td>define text to be added to the HTML meta tag for description</td>
</tr>
<tr>
<td><code>shareRaw</code>
</td>
<td>Note will be served in its raw format, without HTML wrapper. See also&nbsp;
<a
class="reference-link" href="#root/_help_Qjt68inQ2bRj">Serving directly the content of a note</a>&nbsp;for an alternative method
without setting an attribute.</td>
</tr>
<tr>
<td><code>shareDisallowRobotIndexing</code>
</td>
<td>
<p>Indicates to web crawlers that the page should not be indexed of this
note by:</p>
<ul>
<li>Setting the <code>X-Robots-Tag: noindex</code> HTTP header.</li>
<li>Setting the <code>noindex, follow</code> meta tag.</li>
</ul>
</td>
</tr>
<tr>
<td><code>shareCredentials</code>
</td>
<td>require credentials to access this shared note. Value is expected to be
in format <code>username:password</code>. Don't forget to make this inheritable
to apply to child-notes/images.</td>
</tr>
<tr>
<td><code>shareIndex</code>
</td>
<td>Note with this label will list all roots of shared notes.</td>
</tr>
</tbody>
</table>
</figure>

View File

@@ -1,52 +1,32 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../style.css">
<base target="_parent">
<title data-trilium-title>Serving directly the content of a note</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Serving directly the content of a note</h1>
<p>When accessing a shared note, Trilium will render it as a web page. Sometimes
it's desirable to serve the content directly so that it can be used in
a script or downloaded by the user.</p>
<table>
<thead>
<tr>
<th>A note displayed as a web page (HTML)</th>
<th>A note displayed as a raw format</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<img src="1_Serving directly the conte.png">
</td>
<td>
<img src="Serving directly the conte.png">
</td>
</tr>
</tbody>
</table>
<div class="ck-content">
<p>When accessing a shared note, Trilium will render it as a web page. Sometimes
it's desirable to serve the content directly so that it can be used in
a script or downloaded by the user.</p>
<table>
<thead>
<tr>
<th>A note displayed as a web page (HTML)</th>
<th>A note displayed as a raw format</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<img src="1_Serving directly the conte.png">
</td>
<td>
<img src="Serving directly the conte.png">
</td>
</tr>
</tbody>
</table>
<h2>By adding an attribute to the note</h2>
<p>Simply add the <code>#shareRaw</code> attribute and the note will always
be rendered <em>raw</em> when accessed from the share URL.</p>
<h2>By altering the URL</h2>
<p>Append <code>?raw</code> to the URL to display a note in its raw format
regardless of whether the <code>#shareRaw</code> attribute is added on the
note.</p>
<p>
<img src="Serving directly the conte.png">
</p>
</div>
</div>
</body>
</html>
<p>Simply add the <code>#shareRaw</code> attribute and the note will always
be rendered <em>raw</em> when accessed from the share URL.</p>
<h2>By altering the URL</h2>
<p>Append <code>?raw</code> to the URL to display a note in its raw format
regardless of whether the <code>#shareRaw</code> attribute is added on the
note.</p>
<p>
<img src="Serving directly the conte.png">
</p>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 KiB

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 8.7 KiB

View File

@@ -1,27 +1,7 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../style.css">
<base target="_parent">
<title data-trilium-title>Technologies used</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Technologies used</h1>
<div class="ck-content">
<p>One core aspect of Trilium that allows it to have support for multiple&nbsp;
<a
href="#root/_help_KSZ04uQ2D1St">Note Types</a>&nbsp;is the fact that it makes use of various off-the-shelf
or reusable libraries.</p>
<p>The sub-pages showcase some of the technologies used, for a better understanding
of how Trilium works but also to credit the developers of that particular
technology.</p>
</div>
</div>
</body>
</html>
<p>One core aspect of Trilium that allows it to have support for multiple&nbsp;
<a
href="#root/_help_KSZ04uQ2D1St">Note Types</a>&nbsp;is the fact that it makes use of various off-the-shelf
or reusable libraries.</p>
<p>The sub-pages showcase some of the technologies used, for a better understanding
of how Trilium works but also to credit the developers of that particular
technology.</p>

View File

@@ -1,59 +1,45 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../style.css">
<base target="_parent">
<title data-trilium-title>CKEditor</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>CKEditor</h1>
<div class="ck-content">
<h2>Editor core</h2>
<p>The CKEditor is the WYSIWYG (standing for What You See Is What You Get)
editor behind&nbsp;<a href="#root/_help_iPIMuisry3hd">Text</a>&nbsp;notes.</p>
<p>Their website is <a href="https://ckeditor.com/">ckeditor.com</a>.</p>
<p>CKEditor by itself is a commercial product, but the core is open-source.
As described in <a href="https://ckeditor.com/docs/ckeditor5/latest/features/index.html">its documentation</a>,
the editor supports quite a large number of features. Do note that not
all the features are enabled in Trilium.</p>
<h2>Premium features</h2>
<p>Some features are marked as premium in the CKEditor feature set. This
means that they cannot be used without a license.</p>
<p>Trilium cannot benefit from any of these premium features as they require
a commercial license, however we are in discussions with the CKEditor team
to allow us to use a subset of these premium features such as <a href="https://ckeditor.com/docs/ckeditor5/latest/features/slash-commands.html">Slash commands</a>.</p>
<h2>Plugins</h2>
<p>The CKEditor ecosystem is quite extensible, in the sense that custom plugins
can be written to extend the functionality of the editor beyond its original
scope.</p>
<p>Trilium makes use of such features:</p>
<ul>
<li>The math feature is added by a version of <a href="https://github.com/isaul32/ckeditor5-math">isaul32/ckeditor5-math: Math feature for CKEditor 5.</a> modified
by us to fit our needs.</li>
<li>We also make use of modified upstream plugins such as <a href="https://github.com/ckeditor/ckeditor5-mermaid">ckeditor/ckeditor5-mermaid</a> to
allow inline Mermaid code.</li>
<li><a href="https://github.com/mlewand/ckeditor5-keyboard-marker">mlewand/ckeditor5-keyboard-marker: Plugin adds support for the keyboard input element (<code>&lt;kbd&gt;</code>) to CKEditor 5.</a>
</li>
<li>A modified version of <a href="https://github.com/ThomasAitken/ckeditor5-footnotes">ThomasAitken/ckeditor5-footnotes: Footnotes plugin for CKEditor5</a> to
allow footnotes.</li>
</ul>
<p>Apart from that, Trilium also has its own set of specific plugins such
as:</p>
<ul>
<li>Cut to note</li>
<li>Include note</li>
<li>Mentions, for linking pages.</li>
<li>Markdown import.</li>
<li>Reference links.</li>
<li>etc.</li>
</ul>
</div>
</div>
</body>
</html>
<h2>Editor core</h2>
<p>The CKEditor is the WYSIWYG (standing for What You See Is What You Get)
editor behind&nbsp;<a href="#root/_help_iPIMuisry3hd">Text</a>&nbsp;notes.</p>
<p>Their website is <a href="https://ckeditor.com/">ckeditor.com</a>.</p>
<p>CKEditor by itself is a commercial product, but the core is open-source.
As described in <a href="https://ckeditor.com/docs/ckeditor5/latest/features/index.html">its documentation</a>,
the editor supports quite a large number of features. Do note that not
all the features are enabled in Trilium.</p>
<h2>Premium features</h2>
<p>Some features are marked as premium in the CKEditor feature set. This
means that they cannot be used without a license.</p>
<p>Trilium cannot benefit from any of these premium features as they require
a commercial license, however we are in discussions with the CKEditor team
to allow us to use a subset of these premium features such as <a href="https://ckeditor.com/docs/ckeditor5/latest/features/slash-commands.html">Slash commands</a>.</p>
<h2>Plugins</h2>
<p>The CKEditor ecosystem is quite extensible, in the sense that custom plugins
can be written to extend the functionality of the editor beyond its original
scope.</p>
<p>Trilium makes use of such features:</p>
<ul>
<li>The math feature is added by a version of <a href="https://github.com/isaul32/ckeditor5-math">isaul32/ckeditor5-math: Math feature for CKEditor 5.</a> modified
by us to fit our needs.</li>
<li>We also make use of modified upstream plugins such as <a href="https://github.com/ckeditor/ckeditor5-mermaid">ckeditor/ckeditor5-mermaid</a> to
allow inline Mermaid code.</li>
<li><a href="https://github.com/mlewand/ckeditor5-keyboard-marker">mlewand/ckeditor5-keyboard-marker: Plugin adds support for the keyboard input element (<code>&lt;kbd&gt;</code>) to CKEditor 5.</a>
</li>
<li>A modified version of <a href="https://github.com/ThomasAitken/ckeditor5-footnotes">ThomasAitken/ckeditor5-footnotes: Footnotes plugin for CKEditor5</a> to
allow footnotes.</li>
</ul>
<p>Apart from that, Trilium also has its own set of specific plugins such
as:</p>
<ul>
<li><a class="reference-link" href="#root/_help_2x0ZAX9ePtzV">Cut to subnote</a>
</li>
<li><a class="reference-link" href="#root/_help_nBAXQFj20hS1">Include Note</a>
</li>
<li>Mentions, for linking pages.</li>
<li><a class="reference-link" href="#root/_help_Oau6X9rCuegd">Markdown</a>
</li>
<li><a href="#root/_help_QEAPj01N5f7w">Reference links</a>
</li>
<li><a href="#root/_help_NwBbFdNZ9h7O">Admonitions</a>, we ended up creating
our own plugin but <a href="https://github.com/aarkue/ckeditor5-admonition">aarkue/ckeditor5-admonition</a> was
a good inspiration (including the toolbar icon).</li>
</ul>

View File

@@ -1,25 +1,5 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../style.css">
<base target="_parent">
<title data-trilium-title>Excalidraw</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Excalidraw</h1>
<div class="ck-content">
<p><a href="https://excalidraw.com/">Excalidraw</a> is the technology behind
the&nbsp;<a href="#root/_help_grjYqerjn243">Canvas</a>&nbsp;notes. The
source code of the library is available on <a href="https://github.com/excalidraw/excalidraw">GitHub</a>.</p>
<p>We are using an unmodified version of it, so it shares the same <a href="https://github.com/excalidraw/excalidraw/issues">issues</a> as
the original.</p>
</div>
</div>
</body>
</html>
<p><a href="https://excalidraw.com/">Excalidraw</a> is the technology behind
the&nbsp;<a href="#root/_help_grjYqerjn243">Canvas</a>&nbsp;notes. The
source code of the library is available on <a href="https://github.com/excalidraw/excalidraw">GitHub</a>.</p>
<p>We are using an unmodified version of it, so it shares the same <a href="https://github.com/excalidraw/excalidraw/issues">issues</a> as
the original.</p>

View File

@@ -1,28 +1,8 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../style.css">
<base target="_parent">
<title data-trilium-title>Leaflet</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Leaflet</h1>
<div class="ck-content">
<p>Leaflet is the library behind&nbsp;<a href="#root/_help_81SGnPGMk7Xc">Geo map</a>&nbsp;notes.</p>
<h2>Plugins</h2>
<p>Leaflet is also highly customizable via external plugins.</p>
<p>Currently we use:</p>
<ul>
<li><a href="https://github.com/mpetazzoni/leaflet-gpx">mpetazzoni/leaflet-gpx: A GPX track plugin for Leaflet.js</a>
</li>
</ul>
</div>
</div>
</body>
</html>
<p>Leaflet is the library behind&nbsp;<a href="#root/_help_81SGnPGMk7Xc">Geo map</a>&nbsp;notes.</p>
<h2>Plugins</h2>
<p>Leaflet is also highly customizable via external plugins.</p>
<p>Currently we use:</p>
<ul>
<li><a href="https://github.com/mpetazzoni/leaflet-gpx">mpetazzoni/leaflet-gpx: A GPX track plugin for Leaflet.js</a>
</li>
</ul>

View File

@@ -1,29 +1,9 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../style.css">
<base target="_parent">
<title data-trilium-title>MindElixir</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>MindElixir</h1>
<div class="ck-content">
<p>MindElixir is the library we are using for the&nbsp;<a href="#root/_help_gBbsAeiuUxI5">Mind Map</a>&nbsp;note
types.</p>
<p>The main library is available on <a href="https://github.com/SSShooter/mind-elixir-core/issues">GitHub as mind-elixir-core</a>.</p>
<p>The library is embedded as-is without additional modifications.</p>
<p>Issues with its functionality should generally be reported <a href="https://github.com/ssshooter/mind-elixir-core">upstream</a>.</p>
<h2>Plugins</h2>
<p>MindElixir supports plugins, and one such plugin we are making use of
is <a href="https://github.com/SSShooter/node-menu">SSShooter/node-menu: A node menu plugin of mind-elixir</a>,
which allows editing the fonts, colors, links of nodes.</p>
</div>
</div>
</body>
</html>
<p>MindElixir is the library we are using for the&nbsp;<a href="#root/_help_gBbsAeiuUxI5">Mind Map</a>&nbsp;note
types.</p>
<p>The main library is available on <a href="https://github.com/SSShooter/mind-elixir-core/issues">GitHub as mind-elixir-core</a>.</p>
<p>The library is embedded as-is without additional modifications.</p>
<p>Issues with its functionality should generally be reported <a href="https://github.com/ssshooter/mind-elixir-core">upstream</a>.</p>
<h2>Plugins</h2>
<p>MindElixir supports plugins, and one such plugin we are making use of
is <a href="https://github.com/SSShooter/node-menu">SSShooter/node-menu: A node menu plugin of mind-elixir</a>,
which allows editing the fonts, colors, links of nodes.</p>

View File

@@ -1,74 +1,54 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../style.css">
<base target="_parent">
<title data-trilium-title>Templates</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Templates</h1>
<div class="ck-content">
<p>A template in Trilium serves as a predefined structure for other notes,
referred to as instance notes. Assigning a template to a note brings three
main effects:</p>
<ol>
<li><strong>Attribute Inheritance</strong>: All attributes from the template
note are <a href="#root/_help_bwZpz2ajCEwO">inherited</a> by the instance
notes. Even attributes with <code>#isInheritable=false</code> are inherited
by the instance notes, although only inheritable attributes are further
inherited by the children of the instance notes.</li>
<li><strong>Content Duplication</strong>: The content of the template note
is copied to the instance note, provided the instance note is empty at
the time of template assignment.</li>
<li><strong>Child Note Duplication</strong>: All child notes of the template
are deep-duplicated to the instance note.</li>
</ol>
<h2>Example</h2>
<p>A typical example would be a "Book" template note, which might include:</p>
<ul>
<li><strong>Promoted Attributes</strong>: Such as publication year, author,
etc. (see <a href="#root/_help_OFXdgB2nNk1F">promoted attributes</a>).</li>
<li><strong>Outline</strong>: An outline for a book review, including sections
like themes, conclusion, etc.</li>
<li><strong>Child Notes</strong>: Additional notes for highlights, summary,
etc.</li>
</ul>
<p>
<img src="Templates_template.png" alt="Template Example">
</p>
<h2>Instance Note</h2>
<p>An instance note is a note related to a template note. This relationship
means the instance note's content is initialized from the template, and
all attributes from the template are inherited.</p>
<p>To create an instance note through the UI:</p>
<p>
<img src="Templates_template-create-.png" alt="show child note templates">
</p>
<p>For the template to appear in the menu, the template note must have the <code>#template</code> label.
Do not confuse this with the <code>~template</code> relation, which links
the instance note to the template note. If you use <a href="#root/_help_9sRHySam5fXb">workspaces</a>,
you can also mark templates with <code>#workspaceTemplate</code> to display
them only in the workspace.</p>
<p>Templates can also be added or changed after note creation by creating
a <code>~template</code> relation pointing to the desired template note.</p>
<h2>Additional Notes</h2>
<p>From a visual perspective, templates can define <code>#iconClass</code> and <code>#cssClass</code> attributes,
allowing all instance notes (e.g., books) to display a specific icon and
CSS style.</p>
<p>Explore the concept further in the <a href="#root/_help_wX4HbRucYSDD">demo notes</a>,
including examples like the <a href="#root/_help_iRwzGnHPzonm">Relation Map</a>,
<a
href="#root/_help_xYjQUYhpbUEW">Task Manager</a>, and <a href="#root/_help_l0tKav7yLHGF">Day Notes</a>.</p>
<p>Additionally, see <a href="#root/_help_47ZrP6FNuoG8">default note title</a> for
creating title templates. Note templates and title templates can be combined
by creating a <code>#titleTemplate</code> for a template note.</p>
</div>
</div>
</body>
</html>
<p>A template in Trilium serves as a predefined structure for other notes,
referred to as instance notes. Assigning a template to a note brings three
main effects:</p>
<ol>
<li><strong>Attribute Inheritance</strong>: All attributes from the template
note are <a href="#root/_help_bwZpz2ajCEwO">inherited</a> by the instance
notes. Even attributes with <code>#isInheritable=false</code> are inherited
by the instance notes, although only inheritable attributes are further
inherited by the children of the instance notes.</li>
<li><strong>Content Duplication</strong>: The content of the template note
is copied to the instance note, provided the instance note is empty at
the time of template assignment.</li>
<li><strong>Child Note Duplication</strong>: All child notes of the template
are deep-duplicated to the instance note.</li>
</ol>
<h2>Example</h2>
<p>A typical example would be a "Book" template note, which might include:</p>
<ul>
<li><strong>Promoted Attributes</strong>: Such as publication year, author,
etc. (see <a href="#root/_help_OFXdgB2nNk1F">promoted attributes</a>).</li>
<li><strong>Outline</strong>: An outline for a book review, including sections
like themes, conclusion, etc.</li>
<li><strong>Child Notes</strong>: Additional notes for highlights, summary,
etc.</li>
</ul>
<p>
<img src="Templates_template.png" alt="Template Example">
</p>
<h2>Instance Note</h2>
<p>An instance note is a note related to a template note. This relationship
means the instance note's content is initialized from the template, and
all attributes from the template are inherited.</p>
<p>To create an instance note through the UI:</p>
<p>
<img src="Templates_template-create-.png" alt="show child note templates">
</p>
<p>For the template to appear in the menu, the template note must have the <code>#template</code> label.
Do not confuse this with the <code>~template</code> relation, which links
the instance note to the template note. If you use <a href="#root/_help_9sRHySam5fXb">workspaces</a>,
you can also mark templates with <code>#workspaceTemplate</code> to display
them only in the workspace.</p>
<p>Templates can also be added or changed after note creation by creating
a <code>~template</code> relation pointing to the desired template note.</p>
<h2>Additional Notes</h2>
<p>From a visual perspective, templates can define <code>#iconClass</code> and <code>#cssClass</code> attributes,
allowing all instance notes (e.g., books) to display a specific icon and
CSS style.</p>
<p>Explore the concept further in the <a href="#root/_help_wX4HbRucYSDD">demo notes</a>,
including examples like the <a href="#root/_help_iRwzGnHPzonm">Relation Map</a>,
<a
href="#root/_help_xYjQUYhpbUEW">Task Manager</a>, and <a href="#root/_help_l0tKav7yLHGF">Day Notes</a>.</p>
<p>Additionally, see <a href="#root/_help_47ZrP6FNuoG8">default note title</a> for
creating title templates. Note templates and title templates can be combined
by creating a <code>#titleTemplate</code> for a template note.</p>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

After

Width:  |  Height:  |  Size: 53 KiB

View File

@@ -1,36 +1,16 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../style.css">
<base target="_parent">
<title data-trilium-title>Evernote</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Evernote</h1>
<div class="ck-content">
<p>Trilium can import ENEX files which are used by Evernote for backup/export.
One ENEX file represents content (notes and resources) of one notebook.</p>
<h2>Export ENEX from Evernote</h2>
<p>To export ENEX file, you need to have a <em>legacy</em> desktop version
of Evernote (i.e. not web/mobile). Right click on notebook and select export
and follow the wizard.</p>
<h2>Import ENEX in Trilium</h2>
<p>Once you have ENEX file, you can import it to Trilium. Right click on
some note (to which you want to import the file), click on "Import" and
select the ENEX file.</p>
<p>After importing the ENEX file, go over the imported notes and resources
to be sure the import went well, and you didn't lose any data.</p>
<h2>Limitations</h2>
<p>All resources (except for images) are created as note's attachments.</p>
<p>HTML inside ENEX files is not exactly valid so some formatting maybe broken
or lost. You can report major problems into <a href="https://github.com/TriliumNext/Notes/issues">Trilium issue tracker</a>.</p>
</div>
</div>
</body>
</html>
<p>Trilium can import ENEX files which are used by Evernote for backup/export.
One ENEX file represents content (notes and resources) of one notebook.</p>
<h2>Export ENEX from Evernote</h2>
<p>To export ENEX file, you need to have a <em>legacy</em> desktop version
of Evernote (i.e. not web/mobile). Right click on notebook and select export
and follow the wizard.</p>
<h2>Import ENEX in Trilium</h2>
<p>Once you have ENEX file, you can import it to Trilium. Right click on
some note (to which you want to import the file), click on "Import" and
select the ENEX file.</p>
<p>After importing the ENEX file, go over the imported notes and resources
to be sure the import went well, and you didn't lose any data.</p>
<h2>Limitations</h2>
<p>All resources (except for images) are created as note's attachments.</p>
<p>HTML inside ENEX files is not exactly valid so some formatting maybe broken
or lost. You can report major problems into <a href="https://github.com/TriliumNext/Notes/issues">Trilium issue tracker</a>.</p>

View File

@@ -1,80 +1,60 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../style.css">
<base target="_parent">
<title data-trilium-title>Markdown</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Markdown</h1>
<div class="ck-content">
<p>Trilium supports Markdown for both import and export, while trying to
keep compatibility as high as possible.</p>
<h2>Import</h2>
<h3>Clipboard import</h3>
<p>If you want to import just a chunk of markdown from clipboard, you can
do it from editor block menu:</p>
<p>
<img src="Markdown_markdown-inline-i.gif">
</p>
<h3>File import</h3>
<p>You can also import Markdown files from files:</p>
<ul>
<li>single markdown file (with .md extension)</li>
<li>whole tree of markdown files (packaged into <a href="https://en.wikipedia.org/wiki/Tar_(computing)">.zip</a> archive)
<ul>
<li>Markdown files need to be packaged into ZIP archive because browser can't
read directories, only single files.</li>
<li>You can use e.g. <a href="https://www.7-zip.org">7-zip</a> to package directory
of markdown files into the ZIP file</li>
</ul>
</li>
</ul>
<p>[[gifs/markdown-file-import.gif]]</p>
<p>
<img src="Markdown_markdown-file-imp.gif">
</p>
<h2>Export</h2>
<h3>Subtree export</h3>
<p>You can export whole subtree to ZIP archive which will have directory
structured modelled after subtree structure:</p>
<p>
<img src="Markdown_markdown-export-s.gif">
</p>
<h3>Single note export</h3>
<p>If you want to export just single note without its subtree, you can do
it from Note actions menu:</p>
<p>
<img src="Markdown_markdown-export-n.gif">
</p>
<h3>Exporting protected notes</h3>
<p>If you want to export protected notes, enter a protected session first!
This will export the notes in an unencrypted form, so if you reimport into
Trilium, make sure to re-protect these notes.</p>
<h2>Supported syntax</h2>
<ul>
<li><a href="https://github.github.com/gfm/">GitHub-Flavored Markdown</a> is
the main syntax that Trilium is following.</li>
<li>Images are supported. When exporting, images are usually kept in the basic
Markdown syntax but will use the HTML syntax if the image has a custom
width. Figures are always embedded as HTML.</li>
<li>Tables are supported with the Markdown syntax. If the table is too complex
or contains elements that would render as HTML, the table is also rendered
as HTML.</li>
<li><a class="reference-link" href="#root/_help_NwBbFdNZ9h7O">Admonitions</a>&nbsp;are
supported using GitHub's format.</li>
<li>Links are supported. “Reference links” (internal links that mirror a note's
title and display its icon) are embedded as HTML in order to preserve the
information on import.</li>
<li>Math equations are supported using <code>$</code> and <code>$$</code> syntaxes.</li>
</ul>
</div>
</div>
</body>
</html>
<p>Trilium supports Markdown for both import and export, while trying to
keep compatibility as high as possible.</p>
<h2>Import</h2>
<h3>Clipboard import</h3>
<p>If you want to import just a chunk of markdown from clipboard, you can
do it from editor block menu:</p>
<p>
<img src="Markdown_markdown-inline-i.gif">
</p>
<h3>File import</h3>
<p>You can also import Markdown files from files:</p>
<ul>
<li>single markdown file (with .md extension)</li>
<li>whole tree of markdown files (packaged into <a href="https://en.wikipedia.org/wiki/Tar_(computing)">.zip</a> archive)
<ul>
<li>Markdown files need to be packaged into ZIP archive because browser can't
read directories, only single files.</li>
<li>You can use e.g. <a href="https://www.7-zip.org">7-zip</a> to package directory
of markdown files into the ZIP file</li>
</ul>
</li>
</ul>
<p>[[gifs/markdown-file-import.gif]]</p>
<p>
<img src="Markdown_markdown-file-imp.gif">
</p>
<h2>Export</h2>
<h3>Subtree export</h3>
<p>You can export whole subtree to ZIP archive which will have directory
structured modelled after subtree structure:</p>
<p>
<img src="Markdown_markdown-export-s.gif">
</p>
<h3>Single note export</h3>
<p>If you want to export just single note without its subtree, you can do
it from Note actions menu:</p>
<p>
<img src="Markdown_markdown-export-n.gif">
</p>
<h3>Exporting protected notes</h3>
<p>If you want to export protected notes, enter a protected session first!
This will export the notes in an unencrypted form, so if you reimport into
Trilium, make sure to re-protect these notes.</p>
<h2>Supported syntax</h2>
<ul>
<li><a href="https://github.github.com/gfm/">GitHub-Flavored Markdown</a> is
the main syntax that Trilium is following.</li>
<li>Images are supported. When exporting, images are usually kept in the basic
Markdown syntax but will use the HTML syntax if the image has a custom
width. Figures are always embedded as HTML.</li>
<li>Tables are supported with the Markdown syntax. If the table is too complex
or contains elements that would render as HTML, the table is also rendered
as HTML.</li>
<li><a class="reference-link" href="#root/_help_NwBbFdNZ9h7O">Admonitions</a>&nbsp;are
supported using GitHub's format.</li>
<li>Links are supported. “Reference links” (internal links that mirror a note's
title and display its icon) are embedded as HTML in order to preserve the
information on import.</li>
<li>Math equations are supported using <code>$</code> and <code>$$</code> syntaxes.</li>
</ul>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 332 KiB

After

Width:  |  Height:  |  Size: 332 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 309 KiB

After

Width:  |  Height:  |  Size: 309 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 714 KiB

After

Width:  |  Height:  |  Size: 714 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 200 KiB

After

Width:  |  Height:  |  Size: 200 KiB

View File

@@ -1,99 +1,79 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../style.css">
<base target="_parent">
<title data-trilium-title>OneNote</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>OneNote</h1>
<div class="ck-content">
<p><strong>This page describes a method to migrate via EverNote Legacy, but this app is no longer available/working.</strong>
</p>
<h2>Prep Onenote notes for best compatibility</h2>
<ul>
<li>Remove Onenote Tags and replace with Emoji if possible (Onenote Tags will
get imported into trilium as an image which clutters the Trilium tree somewhat)</li>
<li>Make sure to use Onenote headings where applicable (These will be carried
over correctly into Trilium)</li>
<li>Remove extra whitespace in Onenote (Whitespace seems to be more noticible
in Trilium, so removing it now will make it look nicer in trilium)</li>
<li>If possible, try to avoid very long Onenote pages. Trilium works best
with shorter concise pages with any number of sub or (sub-sub...) pages.</li>
<li>Make sure numbered lists don't have unusual spaces between items in the
list (Sometimes the numbered list will start at 1 again in Trilum if there
is an extra space in the list in OneNote).</li>
</ul>
<h2>Migration Procedure</h2>
<h3>Import into Evernote from OneNote:</h3>
<ul>
<li>Install <a href="https://web.archive.org/web/20230327110646/https://help.evernote.com/hc/en-us/articles/360052560314">Evernote Legacy</a>.
Current versions of Evernote do not have this functionality. (Requires
Evernote account, but import works without internet connection - be sure
to NOT sync notes to Evernote!).</li>
<li>In evernote navigate to File &gt; Import &gt; Onenote &gt; Notebook &gt;
Section &gt; OK</li>
</ul>
<p>If exporting all sections at a time, they will not be grouped in folders
- they will all be added to a single folder, but the order will be kept,
so you can re-group into folders after importing to Trilium</p>
<h3>Export from Evernote</h3>
<ul>
<li>Right click on the created notebook in Evernote and choose "Export Notes…"</li>
<li>Use the default export format of .enex</li>
</ul>
<h3>Cleanup enex file (optional)</h3>
<ul>
<li>
<p>If the Onenote header (that is at the top of each Onenote page) is not
desired, you can use the following regex to remove them in a text editor
like VsCode:</p>
<p>Find (using regex): <code>.&lt;div.*&gt;&lt;h1</code> Replace with: <code>&lt;h1</code>
</p>
</li>
</ul>
<h3>Import into Trilium</h3>
<ul>
<li>In Trilium, right click on the root node and choose Import (all default
options should be fine).</li>
<li>Select the .enex file exported from Evernote</li>
<li>Be patient. Large .enex files may take a few minutes to process</li>
<li>Repeat import for each .enex file</li>
</ul>
<h2>Other importing notes:</h2>
<ul>
<li>Centered text in Onenote will be left-justified after importing into Trilium</li>
<li>Internal onenote links will obviously be broken, but the link still exists
so you can do a search in Trilium to find all onenote:// links and then
re-link to the proper Trilium page (there is no way to link to a paragraph
in trilium, so it's good to keep trilium pages short so links point to
a small chunk of information instead of a massive note)</li>
<li>Text colors, highlights, and formatting generally carries over well</li>
<li>Revision history will be lost, but any new revisions will be tracked in
Trilium</li>
<li>The structure of notes are not maintained exactly, so if you had sub-notes
in Onenote, you may have to re-arrange the notes accordingly (This is easy
since the order of the notes is preserved).</li>
<li>Evernote tags are created for each "section" in OneNote and these tags
are carried over to Trilium as attributes
<ul>
<li>If the tags are not desired, you can turn them off in the Evernote export
options.</li>
</ul>
</li>
<li>If the "Created with OneNote" text is not desired, do a find/replace in
the enex files before importing to Trilium</li>
<li>Some links will be disabled (not clickable) when importing from enex.</li>
<li>Files, screenshots, and attachments are all preserved (This is the only
one-note export option that seems to preserve all of these).</li>
</ul>
</div>
</div>
</body>
</html>
<p><strong>This page describes a method to migrate via EverNote Legacy, but this app is no longer available/working.</strong>
</p>
<h2>Prep Onenote notes for best compatibility</h2>
<ul>
<li>Remove Onenote Tags and replace with Emoji if possible (Onenote Tags will
get imported into trilium as an image which clutters the Trilium tree somewhat)</li>
<li>Make sure to use Onenote headings where applicable (These will be carried
over correctly into Trilium)</li>
<li>Remove extra whitespace in Onenote (Whitespace seems to be more noticible
in Trilium, so removing it now will make it look nicer in trilium)</li>
<li>If possible, try to avoid very long Onenote pages. Trilium works best
with shorter concise pages with any number of sub or (sub-sub...) pages.</li>
<li>Make sure numbered lists don't have unusual spaces between items in the
list (Sometimes the numbered list will start at 1 again in Trilum if there
is an extra space in the list in OneNote).</li>
</ul>
<h2>Migration Procedure</h2>
<h3>Import into Evernote from OneNote:</h3>
<ul>
<li>Install <a href="https://web.archive.org/web/20230327110646/https://help.evernote.com/hc/en-us/articles/360052560314">Evernote Legacy</a>.
Current versions of Evernote do not have this functionality. (Requires
Evernote account, but import works without internet connection - be sure
to NOT sync notes to Evernote!).</li>
<li>In evernote navigate to File &gt; Import &gt; Onenote &gt; Notebook &gt;
Section &gt; OK</li>
</ul>
<p>If exporting all sections at a time, they will not be grouped in folders
- they will all be added to a single folder, but the order will be kept,
so you can re-group into folders after importing to Trilium</p>
<h3>Export from Evernote</h3>
<ul>
<li>Right click on the created notebook in Evernote and choose "Export Notes…"</li>
<li>Use the default export format of .enex</li>
</ul>
<h3>Cleanup enex file (optional)</h3>
<ul>
<li>
<p>If the Onenote header (that is at the top of each Onenote page) is not
desired, you can use the following regex to remove them in a text editor
like VsCode:</p>
<p>Find (using regex): <code>.&lt;div.*&gt;&lt;h1</code> Replace with: <code>&lt;h1</code>
</p>
</li>
</ul>
<h3>Import into Trilium</h3>
<ul>
<li>In Trilium, right click on the root node and choose Import (all default
options should be fine).</li>
<li>Select the .enex file exported from Evernote</li>
<li>Be patient. Large .enex files may take a few minutes to process</li>
<li>Repeat import for each .enex file</li>
</ul>
<h2>Other importing notes:</h2>
<ul>
<li>Centered text in Onenote will be left-justified after importing into Trilium</li>
<li>Internal onenote links will obviously be broken, but the link still exists
so you can do a search in Trilium to find all onenote:// links and then
re-link to the proper Trilium page (there is no way to link to a paragraph
in trilium, so it's good to keep trilium pages short so links point to
a small chunk of information instead of a massive note)</li>
<li>Text colors, highlights, and formatting generally carries over well</li>
<li>Revision history will be lost, but any new revisions will be tracked in
Trilium</li>
<li>The structure of notes are not maintained exactly, so if you had sub-notes
in Onenote, you may have to re-arrange the notes accordingly (This is easy
since the order of the notes is preserved).</li>
<li>Evernote tags are created for each "section" in OneNote and these tags
are carried over to Trilium as attributes
<ul>
<li>If the tags are not desired, you can turn them off in the Evernote export
options.</li>
</ul>
</li>
<li>If the "Created with OneNote" text is not desired, do a find/replace in
the enex files before importing to Trilium</li>
<li>Some links will be disabled (not clickable) when importing from enex.</li>
<li>Files, screenshots, and attachments are all preserved (This is the only
one-note export option that seems to preserve all of these).</li>
</ul>

View File

@@ -1,133 +1,113 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../style.css">
<base target="_parent">
<title data-trilium-title>Keyboard Shortcuts</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Keyboard Shortcuts</h1>
<div class="ck-content">
<p>This is supposed to be a complete list of keyboard shortcuts. Note that
some of these may work only in certain contexts (e.g. in tree pane or note
editor).</p>
<p>It is also possible to configure most keyboard shortcuts in Options -&gt;
Keyboard shortcuts. Using <code>global:</code> prefix, you can assign a shortcut
which will work even without Trilium being in focus (requires app restart
to take effect).</p>
<h2>Note navigation</h2>
<ul>
<li><kbd><span></span></kbd>, <kbd><span></span></kbd> - go up/down in the
list of notes, <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd><span></span></kbd> and <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd><span></span></kbd> &nbsp;work
also from editor</li>
<li><kbd><span></span></kbd>, <kbd><span></span></kbd> - collapse/expand node</li>
<li><kbd>Alt</kbd> + <kbd><span></span></kbd>, <kbd>Alt</kbd> + <kbd><span></span></kbd> -
go back / forwards in the history</li>
<li><kbd>Ctrl</kbd> + <kbd>J</kbd> - show <a href="#root/_help_MMiBEQljMQh2">"Jump to" dialog</a>
</li>
<li><kbd>Ctrl</kbd> + <kbd>.</kbd> - scroll to current note (useful when you
scroll away from your note or your focus is currently in the editor)</li>
<li><kbd><span>Backspace</span></kbd> - jumps to parent note</li>
<li><kbd>Alt</kbd> + <kbd>C</kbd> - collapse whole note tree</li>
<li><kbd>Alt</kbd> + <kbd>-</kbd> (alt with minus sign) - collapse subtree (if
some subtree takes too much space on tree pane you can collapse it)</li>
<li>you can define a <a href="#root/_help_zEY4DaJG4YT5">label</a> <code>#keyboardShortcut</code> with
e.g. value <kbd>Ctrl</kbd> + <kbd>I</kbd> . Pressing this keyboard combination
will then bring you to the note on which it is defined. Note that Trilium
must be reloaded/restarted (<kbd>Ctrl</kbd> + <kbd>R</kbd> ) for changes to
be in effect.</li>
</ul>
<p>See demo of some of these features in <a href="#root/_help_MMiBEQljMQh2">note navigation</a>.</p>
<h2>Tabs</h2>
<ul>
<li><kbd>Ctrl</kbd> + <kbd>🖱 Left click</kbd> - (or middle mouse click) on note
link opens note in a new tab</li>
</ul>
<p>Only in desktop (electron build):</p>
<ul>
<li><kbd>Ctrl</kbd> + <kbd>T</kbd> - opens empty tab</li>
<li><kbd>Ctrl</kbd> + <kbd>W</kbd> - closes active tab</li>
<li><kbd>Ctrl</kbd> + <kbd>Tab</kbd> - activates next tab</li>
<li><kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Tab</kbd> - activates previous tab</li>
</ul>
<h2>Creating notes</h2>
<ul>
<li><code>CTRL+O</code> - creates new note after the current note</li>
<li><code>CTRL+P</code> - creates new sub-note into current note</li>
<li><code>F2</code> - edit <a href="#root/_help_MMiBEQljMQh2">prefix</a> of current
note clone</li>
</ul>
<h2>Moving / cloning notes</h2>
<ul>
<li><kbd>Ctrl</kbd> + <kbd><span></span></kbd> , Ctrl + <kbd><span></span></kbd> -
move note up/down in the note list</li>
<li><kbd>Ctrl</kbd> + <kbd><span></span></kbd> - move note up in the note tree</li>
<li><kbd>Ctrl</kbd>+<kbd><span></span></kbd> - move note down in the note
tree</li>
<li><kbd>Shift</kbd>+<kbd><span></span></kbd>, <kbd>Shift</kbd><code>+</code><kbd><span></span></kbd> -
multi-select note above/below</li>
<li><kbd>Ctrl</kbd>+<kbd>A</kbd> - select all notes in the current level</li>
<li><kbd>Shift</kbd>+<kbd>🖱 Left click</kbd> - multi select note which you
clicked on</li>
<li><kbd>Ctrl</kbd>+<kbd>C</kbd> - copies current note (or current selection)
into clipboard (used for <a href="#root/_help_IakOLONlIfGI">cloning</a>
</li>
<li><kbd>Ctrl</kbd>+<kbd>X</kbd> - cuts current (or current selection) note
into clipboard (used for moving notes)</li>
<li><kbd>Ctrl</kbd>+<kbd>V</kbd> - pastes note(s) as sub-note into current
note (which is either move or clone depending on whether it was copied
or cut into clipboard)</li>
<li><kbd>Del</kbd> - delete note / sub-tree</li>
</ul>
<h2>Editing notes</h2>
<p>Trilium uses CKEditor 5 for the <a href="#root/_help_iPIMuisry3hd">text notes</a> and
CodeMirror 5 for <a href="#root/_help_6f9hih2hXXZk">code notes</a>. Check
the documentation of these projects to see all their built-in keyboard
shortcuts.</p>
<ul>
<li><kbd>Alt</kbd>-<kbd>F10</kbd> - bring up inline formatting toolbar (arrow
keys <kbd><span></span></kbd>,<kbd><span></span></kbd> to navigate, <kbd>Enter</kbd> to
apply)</li>
<li><kbd>Alt</kbd>-<kbd>F10</kbd> - again to bring up block formatting toolbar</li>
<li><kbd>Enter</kbd> in tree pane switches from tree pane into note title.
Enter from note title switches focus to text editor. <kbd>Ctrl</kbd>+<kbd>.</kbd> switches
back from editor to tree pane.</li>
<li><kbd>Ctrl</kbd>+<kbd>K</kbd> - create / edit <a href="#root/_help_QEAPj01N5f7w">external link</a>
</li>
<li><kbd>Ctrl</kbd>+<kbd>L</kbd> - create <a href="#root/_help_QEAPj01N5f7w">internal (note) link</a>
</li>
<li><kbd>Alt</kbd>+<kbd>T</kbd> - inserts current date and time at caret position</li>
<li><kbd>Ctrl</kbd>+<kbd>.</kbd> - jump away from the editor to tree pane and
scroll to current note</li>
</ul>
<h2>Runtime shortcuts</h2>
<p>These are hooked in Electron to be similar to native browser keyboard
shortcuts.</p>
<ul>
<li><kbd>F5</kbd>, <kbd>Ctrl</kbd>-<kbd>R</kbd> - reloads Trilium front-end</li>
<li><kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>I</kbd> - show developer tools</li>
<li><kbd>Ctrl</kbd>+<kbd>F</kbd> - show search dialog</li>
<li><kbd>Ctrl</kbd>+<kbd>-</kbd> - zoom out</li>
<li><kbd>Ctrl</kbd>+<kbd>=</kbd> - zoom in</li>
</ul>
<h2>Other</h2>
<ul>
<li><kbd>Alt</kbd>+<kbd>O</kbd> - show SQL console (use only if you know what
you're doing)</li>
<li><kbd>Alt</kbd>+<kbd>M</kbd> - distraction-free mode - display only note
editor, everything else is hidden</li>
<li><kbd>F11</kbd> - toggle full screen</li>
<li><kbd>Ctrl</kbd> + <kbd>S</kbd> - toggle <a href="#root/_help_eIg8jdvaoNNd">search</a> form
in tree pane</li>
<li><kbd>Alt</kbd> +<kbd>A</kbd> - show note <a href="#root/_help_zEY4DaJG4YT5">attributes</a> dialog</li>
</ul>
</div>
</div>
</body>
</html>
<p>This is supposed to be a complete list of keyboard shortcuts. Note that
some of these may work only in certain contexts (e.g. in tree pane or note
editor).</p>
<p>It is also possible to configure most keyboard shortcuts in Options -&gt;
Keyboard shortcuts. Using <code>global:</code> prefix, you can assign a shortcut
which will work even without Trilium being in focus (requires app restart
to take effect).</p>
<h2>Note navigation</h2>
<ul>
<li><kbd><span></span></kbd>, <kbd><span></span></kbd> - go up/down in the
list of notes, <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd><span></span></kbd> and <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd><span></span></kbd> &nbsp;work
also from editor</li>
<li><kbd><span></span></kbd>, <kbd><span></span></kbd> - collapse/expand node</li>
<li><kbd>Alt</kbd> + <kbd><span></span></kbd>, <kbd>Alt</kbd> + <kbd><span></span></kbd> -
go back / forwards in the history</li>
<li><kbd>Ctrl</kbd> + <kbd>J</kbd> - show <a href="#root/_help_MMiBEQljMQh2">"Jump to" dialog</a>
</li>
<li><kbd>Ctrl</kbd> + <kbd>.</kbd> - scroll to current note (useful when you
scroll away from your note or your focus is currently in the editor)</li>
<li><kbd><span>Backspace</span></kbd> - jumps to parent note</li>
<li><kbd>Alt</kbd> + <kbd>C</kbd> - collapse whole note tree</li>
<li><kbd>Alt</kbd> + <kbd>-</kbd> (alt with minus sign) - collapse subtree (if
some subtree takes too much space on tree pane you can collapse it)</li>
<li>you can define a <a href="#root/_help_zEY4DaJG4YT5">label</a> <code>#keyboardShortcut</code> with
e.g. value <kbd>Ctrl</kbd> + <kbd>I</kbd> . Pressing this keyboard combination
will then bring you to the note on which it is defined. Note that Trilium
must be reloaded/restarted (<kbd>Ctrl</kbd> + <kbd>R</kbd> ) for changes to
be in effect.</li>
</ul>
<p>See demo of some of these features in <a href="#root/_help_MMiBEQljMQh2">note navigation</a>.</p>
<h2>Tabs</h2>
<ul>
<li><kbd>Ctrl</kbd> + <kbd>🖱 Left click</kbd> - (or middle mouse click) on note
link opens note in a new tab</li>
</ul>
<p>Only in desktop (electron build):</p>
<ul>
<li><kbd>Ctrl</kbd> + <kbd>T</kbd> - opens empty tab</li>
<li><kbd>Ctrl</kbd> + <kbd>W</kbd> - closes active tab</li>
<li><kbd>Ctrl</kbd> + <kbd>Tab</kbd> - activates next tab</li>
<li><kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Tab</kbd> - activates previous tab</li>
</ul>
<h2>Creating notes</h2>
<ul>
<li><code>CTRL+O</code> - creates new note after the current note</li>
<li><code>CTRL+P</code> - creates new sub-note into current note</li>
<li><code>F2</code> - edit <a href="#root/_help_MMiBEQljMQh2">prefix</a> of current
note clone</li>
</ul>
<h2>Moving / cloning notes</h2>
<ul>
<li><kbd>Ctrl</kbd> + <kbd><span></span></kbd> , Ctrl + <kbd><span></span></kbd> -
move note up/down in the note list</li>
<li><kbd>Ctrl</kbd> + <kbd><span></span></kbd> - move note up in the note tree</li>
<li><kbd>Ctrl</kbd>+<kbd><span></span></kbd> - move note down in the note
tree</li>
<li><kbd>Shift</kbd>+<kbd><span></span></kbd>, <kbd>Shift</kbd><code>+</code><kbd><span></span></kbd> -
multi-select note above/below</li>
<li><kbd>Ctrl</kbd>+<kbd>A</kbd> - select all notes in the current level</li>
<li><kbd>Shift</kbd>+<kbd>🖱 Left click</kbd> - multi select note which you
clicked on</li>
<li><kbd>Ctrl</kbd>+<kbd>C</kbd> - copies current note (or current selection)
into clipboard (used for <a href="#root/_help_IakOLONlIfGI">cloning</a>
</li>
<li><kbd>Ctrl</kbd>+<kbd>X</kbd> - cuts current (or current selection) note
into clipboard (used for moving notes)</li>
<li><kbd>Ctrl</kbd>+<kbd>V</kbd> - pastes note(s) as sub-note into current
note (which is either move or clone depending on whether it was copied
or cut into clipboard)</li>
<li><kbd>Del</kbd> - delete note / sub-tree</li>
</ul>
<h2>Editing notes</h2>
<ul>
<li>For&nbsp;<a class="reference-link" href="#root/_help_iPIMuisry3hd">Text</a>&nbsp;notes,
refer to&nbsp;<a class="reference-link" href="#root/_help_oiVPnW8QfnvS">Keyboard shortcuts</a>&nbsp;and&nbsp;
<a
class="reference-link" href="#root/_help_QrtTYPmdd1qq">Markdown-like formatting</a>.</li>
<li><kbd>Alt</kbd>-<kbd>F10</kbd> - bring up inline formatting toolbar (arrow
keys <kbd><span></span></kbd>,<kbd><span></span></kbd> to navigate, <kbd>Enter</kbd> to
apply)</li>
<li><kbd>Alt</kbd>-<kbd>F10</kbd> - again to bring up block formatting toolbar</li>
<li><kbd>Enter</kbd> in tree pane switches from tree pane into note title.
Enter from note title switches focus to text editor. <kbd>Ctrl</kbd>+<kbd>.</kbd> switches
back from editor to tree pane.</li>
<li><kbd>Ctrl</kbd>+<kbd>K</kbd> - create / edit <a href="#root/_help_QEAPj01N5f7w">external link</a>
</li>
<li><kbd>Ctrl</kbd>+<kbd>L</kbd> - create <a href="#root/_help_QEAPj01N5f7w">internal (note) link</a>
</li>
<li><kbd>Alt</kbd>+<kbd>T</kbd> - inserts current date and time at caret position</li>
<li><kbd>Ctrl</kbd>+<kbd>.</kbd> - jump away from the editor to tree pane and
scroll to current note</li>
</ul>
<h2>Runtime shortcuts</h2>
<p>These are hooked in Electron to be similar to native browser keyboard
shortcuts.</p>
<ul>
<li><kbd>F5</kbd>, <kbd>Ctrl</kbd>-<kbd>R</kbd> - reloads Trilium front-end</li>
<li><kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>I</kbd> - show developer tools</li>
<li><kbd>Ctrl</kbd>+<kbd>F</kbd> - show search dialog</li>
<li><kbd>Ctrl</kbd>+<kbd>-</kbd> - zoom out</li>
<li><kbd>Ctrl</kbd>+<kbd>=</kbd> - zoom in</li>
</ul>
<h2>Other</h2>
<ul>
<li><kbd>Alt</kbd>+<kbd>O</kbd> - show SQL console (use only if you know what
you're doing)</li>
<li><kbd>Alt</kbd>+<kbd>M</kbd> - distraction-free mode - display only note
editor, everything else is hidden</li>
<li><kbd>F11</kbd> - toggle full screen</li>
<li><kbd>Ctrl</kbd> + <kbd>S</kbd> - toggle <a href="#root/_help_eIg8jdvaoNNd">search</a> form
in tree pane</li>
<li><kbd>Alt</kbd> +<kbd>A</kbd> - show note <a href="#root/_help_zEY4DaJG4YT5">attributes</a> dialog</li>
</ul>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 729 B

After

Width:  |  Height:  |  Size: 317 B

View File

@@ -1,32 +1,12 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../style.css">
<base target="_parent">
<title data-trilium-title>Bookmarks</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Bookmarks</h1>
<div class="ck-content">
<p>To easily access selected notes, you can bookmark them. See demo:</p>
<p>
<img src="Bookmarks_bookmarks.gif">
</p>
<h2>Bookmark folder</h2>
<p>Space in the left panel is limited, and you might want to bookmark many
items. One possible solution is to bookmark a folder, so it shows its children:</p>
<p>
<img src="Bookmarks_bookmark-folder.png">
</p>
<p>To do this, you need to add a <code>#bookmarkFolder</code> label to the
note.</p>
</div>
</div>
</body>
</html>
<p>To easily access selected notes, you can bookmark them. See demo:</p>
<p>
<img src="Bookmarks_bookmarks.gif">
</p>
<h2>Bookmark folder</h2>
<p>Space in the left panel is limited, and you might want to bookmark many
items. One possible solution is to bookmark a folder, so it shows its children:</p>
<p>
<img src="Bookmarks_bookmark-folder.png">
</p>
<p>To do this, you need to add a <code>#bookmarkFolder</code> label to the
note.</p>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 305 KiB

After

Width:  |  Height:  |  Size: 305 KiB

View File

@@ -1,53 +1,33 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../style.css">
<base target="_parent">
<title data-trilium-title>Jump to Note</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Jump to Note</h1>
<figure class="image image-style-align-center">
<img style="aspect-ratio:991/403;" src="Jump to Note_image.png" width="991"
height="403">
</figure>
<p>The <em>Jump to Note</em> function allows easy navigation between notes
by searching for their title. In addition to that, it can also trigger
a full search or create notes.</p>
<h2>Entering jump to note</h2>
<ul>
<li>In the&nbsp;<a class="reference-link" href="#root/_help_xYmIYSP6wE3F">Launch Bar</a>,
press
<img src="1_Jump to Note_image.png">button.</li>
<li>Using the keyboard, press <kbd>Ctrl</kbd> + <kbd>J</kbd>.</li>
</ul>
<h2>Recent notes</h2>
<p>Jump to note also has the ability to show the list of recently viewed
/ edited notes and quickly jump to it.</p>
<p>To access this functionality, click on <code>Jump to</code> button on the
top. By default, (when nothing is entered into autocomplete), this dialog
will show the list of recent notes.</p>
<p>Alternatively you can click on the "time" icon on the right.</p>
<img src="Jump to Note_recent-notes.gif"
width="812" height="585">
<div class="ck-content">
<figure class="image image-style-align-center">
<img style="aspect-ratio:991/403;" src="Jump to Note_image.png" width="991"
height="403">
</figure>
<p>The <em>Jump to Note</em> function allows easy navigation between notes
by searching for their title. In addition to that, it can also trigger
a full search or create notes.</p>
<h2>Entering jump to note</h2>
<ul>
<li>In the&nbsp;<a class="reference-link" href="#root/_help_xYmIYSP6wE3F">Launch Bar</a>,
press
<img src="1_Jump to Note_image.png">button.</li>
<li>Using the keyboard, press <kbd>Ctrl</kbd> + <kbd>J</kbd>.</li>
</ul>
<h2>Recent notes</h2>
<p>Jump to note also has the ability to show the list of recently viewed
/ edited notes and quickly jump to it.</p>
<p>To access this functionality, click on <code>Jump to</code> button on the
top. By default, (when nothing is entered into autocomplete), this dialog
will show the list of recent notes.</p>
<p>Alternatively you can click on the "time" icon on the right.</p>
<img src="Jump to Note_recent-notes.gif"
width="812" height="585">
<h2>Interaction</h2>
<ul>
<li>By default, when there is no text entered it will display the most recent
notes.</li>
<li>Using the keyboard, use the up or down arrow keys to navigate between
items. Press <kbd>Enter</kbd> to open the desired note.</li>
<li>If the note doesn't exist, it's possible to create it by typing the desired
note title and selecting the <em>Create and link child note</em> option.</li>
</ul>
</div>
</div>
</body>
</html>
<ul>
<li>By default, when there is no text entered it will display the most recent
notes.</li>
<li>Using the keyboard, use the up or down arrow keys to navigate between
items. Press <kbd>Enter</kbd> to open the desired note.</li>
<li>If the note doesn't exist, it's possible to create it by typing the desired
note title and selecting the <em>Create and link child note</em> option.</li>
</ul>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 265 KiB

After

Width:  |  Height:  |  Size: 265 KiB

View File

@@ -1,31 +1,11 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../style.css">
<base target="_parent">
<title data-trilium-title>Note Hoisting</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Note Hoisting</h1>
<div class="ck-content">
<p>Hoisting is a standard outliner feature which allows you to focus on (or
"zoom into") a specific note and its subtree by hiding all parent and sibling
notes. Demo:</p>
<p>
<img src="Note Hoisting_note-hoistin.gif">
</p>
<p>In addition to showing only this subtree, this also narrows both full
text search and <a href="#root/_help_MMiBEQljMQh2">“jump to note”</a> to
just notes present in hoisted subtree.</p>
<p>See also <a href="#root/_help_9sRHySam5fXb">Workspace</a> which extends
this feature.</p>
</div>
</div>
</body>
</html>
<p>Hoisting is a standard outliner feature which allows you to focus on (or
"zoom into") a specific note and its subtree by hiding all parent and sibling
notes. Demo:</p>
<p>
<img src="Note Hoisting_note-hoistin.gif">
</p>
<p>In addition to showing only this subtree, this also narrows both full
text search and <a href="#root/_help_MMiBEQljMQh2">“jump to note”</a> to
just notes present in hoisted subtree.</p>
<p>See also <a href="#root/_help_9sRHySam5fXb">Workspace</a> which extends
this feature.</p>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 178 KiB

After

Width:  |  Height:  |  Size: 178 KiB

View File

@@ -1,36 +1,16 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../style.css">
<base target="_parent">
<title data-trilium-title>Note Navigation</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Note Navigation</h1>
<div class="ck-content">
<p>One of the Trilium's goals is to provide fast and comfortable navigation
between notes.</p>
<h2>Backwards and forward</h2>
<p>You can use alt-left and alt-right to move back and forward in history
of viewed pages.</p>
<p>This works identically to browser backwards / forwards, it's actually
using built-in browser support for this.</p>
<p>
<img src="Note Navigation_image.png">
</p>
<h2>Jump to note</h2>
<p>This is useful to quickly find and view arbitrary notes - click on <code>Jump to</code> button
on the top or press <kbd>Ctrl</kbd> + <kbd>J</kbd> . Then type part of the
note name and autocomplete will help you pick the desired note.</p>
<p>See&nbsp;<a class="reference-link" href="#root/_help_F1r9QtzQLZqm">Jump to Note</a>&nbsp;for
more information.</p>
</div>
</div>
</body>
</html>
<p>One of the Trilium's goals is to provide fast and comfortable navigation
between notes.</p>
<h2>Backwards and forward</h2>
<p>You can use alt-left and alt-right to move back and forward in history
of viewed pages.</p>
<p>This works identically to browser backwards / forwards, it's actually
using built-in browser support for this.</p>
<p>
<img src="Note Navigation_image.png">
</p>
<h2>Jump to note</h2>
<p>This is useful to quickly find and view arbitrary notes - click on <code>Jump to</code> button
on the top or press <kbd>Ctrl</kbd> + <kbd>J</kbd> . Then type part of the
note name and autocomplete will help you pick the desired note.</p>
<p>See&nbsp;<a class="reference-link" href="#root/_help_F1r9QtzQLZqm">Jump to Note</a>&nbsp;for
more information.</p>

View File

@@ -1,43 +1,23 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../style.css">
<base target="_parent">
<title data-trilium-title>Quick search</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Quick search</h1>
<div class="ck-content">
<figure class="image image-style-align-center">
<img style="aspect-ratio:659/256;" src="Quick search_image.png" width="659"
height="256">
</figure>
<p>The <em>Quick search</em> function does a full-text search (that is, it
searches through the content of notes and not just the title of a note)
and displays the result in an easy-to-access manner.</p>
<p>The alternative to the quick search is the&nbsp;<a class="reference-link"
href="#root/_help_eIg8jdvaoNNd">Search</a>&nbsp;function, which opens in
a dedicated tab and has support for advanced queries.</p>
<p>For even faster navigation, it's possible to use&nbsp;<a class="reference-link"
href="#root/_help_F1r9QtzQLZqm">Jump to Note</a>&nbsp;which will only search
through the note titles instead of the content.</p>
<h2>Layout</h2>
<p>Based on the&nbsp;<a class="reference-link" href="#root/_help_x0JgW8UqGXvq">Vertical and horizontal layout</a>,
the quick search is placed:</p>
<ul>
<li>On the vertical layout, it is displayed right above the&nbsp;<a class="reference-link"
href="#root/_help_oPVyFC7WL2Lp">Note Tree</a>.</li>
<li>On the horizontal layout, it is displayed in the&nbsp;<a class="reference-link"
href="#root/_help_xYmIYSP6wE3F">Launch Bar</a>, where it can be positioned
just like any other icon.</li>
</ul>
</div>
</div>
</body>
</html>
<figure class="image image-style-align-center">
<img style="aspect-ratio:659/256;" src="Quick search_image.png" width="659"
height="256">
</figure>
<p>The <em>Quick search</em> function does a full-text search (that is, it
searches through the content of notes and not just the title of a note)
and displays the result in an easy-to-access manner.</p>
<p>The alternative to the quick search is the&nbsp;<a class="reference-link"
href="#root/_help_eIg8jdvaoNNd">Search</a>&nbsp;function, which opens in
a dedicated tab and has support for advanced queries.</p>
<p>For even faster navigation, it's possible to use&nbsp;<a class="reference-link"
href="#root/_help_F1r9QtzQLZqm">Jump to Note</a>&nbsp;which will only search
through the note titles instead of the content.</p>
<h2>Layout</h2>
<p>Based on the&nbsp;<a class="reference-link" href="#root/_help_x0JgW8UqGXvq">Vertical and horizontal layout</a>,
the quick search is placed:</p>
<ul>
<li>On the vertical layout, it is displayed right above the&nbsp;<a class="reference-link"
href="#root/_help_oPVyFC7WL2Lp">Note Tree</a>.</li>
<li>On the horizontal layout, it is displayed in the&nbsp;<a class="reference-link"
href="#root/_help_xYmIYSP6wE3F">Launch Bar</a>, where it can be positioned
just like any other icon.</li>
</ul>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -1,68 +1,48 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../style.css">
<base target="_parent">
<title data-trilium-title>Search in note</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Search in note</h1>
<div class="ck-content">
<figure class="image image_resized" style="width:100%;">
<img style="aspect-ratio:898/93;" src="Search in note_image.png" width="898"
height="93">
</figure>
<p>Local search allows you to search within the currently displayed note.&nbsp;</p>
<h2>Alternatives</h2>
<ul>
<li>Pressing Ctrl+F while in a browser while not focused in a&nbsp;<a class="reference-link"
href="#root/_help_iPIMuisry3hd">Text</a>&nbsp;or a&nbsp;<a class="reference-link"
href="#root/_help_6f9hih2hXXZk">Code</a>&nbsp;note will trigger the browser's
native search. This will also find text that is part of Trilium's UI.</li>
<li>Pressing Ctrl+F in a&nbsp;<a class="reference-link" href="#root/_help_iPIMuisry3hd">Text</a>&nbsp;note
will reveal&nbsp;<a class="reference-link" href="#root/_help_MI26XDLSAlCD">CKEditor</a>'s
search functionality.</li>
</ul>
<h2>Accessing the search</h2>
<ul>
<li>On desktop, press<kbd>Ctrl</kbd> + <kbd>F</kbd>
</li>
<li>From the&nbsp;<a class="reference-link" href="#root/_help_8YBEPzcpUgxw">Note buttons</a>,
look for the context menu and select <em>Search in note</em>.</li>
</ul>
<h2>Interaction</h2>
<ul>
<li>Finding:
<ul>
<li>Fill in the <em>Find in text…</em> with the text to search for.</li>
<li>The search will be executed automatically in the background.</li>
<li>Use up and down arrows of the text box to navigate between results.</li>
</ul>
</li>
<li>Replacing:
<ul>
<li>Fill in the <em>Find in text</em>… field with the text to replace.</li>
<li>Fill in the <em>Replace with…</em> field the text to replace it with.</li>
<li>Press <em>Replace</em> to replace only the current result.</li>
<li>Press <em>Replace all</em> to replace all of them at once.</li>
</ul>
</li>
<li>Options:
<ul>
<li><em>Case sensitive</em> the search will distinguish upper case characters
from lower case (e.g. searching for Hello will not match <code>hello</code>).</li>
<li><em>Match words</em> - the search will find only exact word matches (e.g.
searching for <code>Java</code> will not match <code>JavaScript</code>).</li>
</ul>
</li>
</ul>
</div>
</div>
</body>
</html>
<figure class="image image_resized" style="width:100%;">
<img style="aspect-ratio:898/93;" src="Search in note_image.png" width="898"
height="93">
</figure>
<p>Local search allows you to search within the currently displayed note.&nbsp;</p>
<h2>Alternatives</h2>
<ul>
<li>Pressing Ctrl+F while in a browser while not focused in a&nbsp;<a class="reference-link"
href="#root/_help_iPIMuisry3hd">Text</a>&nbsp;or a&nbsp;<a class="reference-link"
href="#root/_help_6f9hih2hXXZk">Code</a>&nbsp;note will trigger the browser's
native search. This will also find text that is part of Trilium's UI.</li>
<li>Pressing Ctrl+F in a&nbsp;<a class="reference-link" href="#root/_help_iPIMuisry3hd">Text</a>&nbsp;note
will reveal&nbsp;<a class="reference-link" href="#root/_help_MI26XDLSAlCD">CKEditor</a>'s
search functionality.</li>
</ul>
<h2>Accessing the search</h2>
<ul>
<li>On desktop, press<kbd>Ctrl</kbd> + <kbd>F</kbd>
</li>
<li>From the&nbsp;<a class="reference-link" href="#root/_help_8YBEPzcpUgxw">Note buttons</a>,
look for the context menu and select <em>Search in note</em>.</li>
</ul>
<h2>Interaction</h2>
<ul>
<li>Finding:
<ul>
<li>Fill in the <em>Find in text…</em> with the text to search for.</li>
<li>The search will be executed automatically in the background.</li>
<li>Use up and down arrows of the text box to navigate between results.</li>
</ul>
</li>
<li>Replacing:
<ul>
<li>Fill in the <em>Find in text</em>… field with the text to replace.</li>
<li>Fill in the <em>Replace with…</em> field the text to replace it with.</li>
<li>Press <em>Replace</em> to replace only the current result.</li>
<li>Press <em>Replace all</em> to replace all of them at once.</li>
</ul>
</li>
<li>Options:
<ul>
<li><em>Case sensitive</em> the search will distinguish upper case characters
from lower case (e.g. searching for Hello will not match <code>hello</code>).</li>
<li><em>Match words</em> - the search will find only exact word matches (e.g.
searching for <code>Java</code> will not match <code>JavaScript</code>).</li>
</ul>
</li>
</ul>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@@ -1,263 +1,243 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../style.css">
<base target="_parent">
<title data-trilium-title>Search</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Search</h1>
<div class="ck-content">
<figure class="image">
<img style="aspect-ratio:987/725;" src="Search_image.png" width="987"
height="725">
</figure>
<p>Note search enables you to find notes by searching for text in the title,
content, or <a href="#root/_help_zEY4DaJG4YT5">attributes</a> of the notes.
You also have the option to save your searches, which will create a special
search note which is visible on your navigation tree and contains the search
results as sub-items.</p>
<h2>Accessing the search</h2>
<figure class="image">
<img style="aspect-ratio:987/725;" src="Search_image.png" width="987"
height="725">
</figure>
<p>Note search enables you to find notes by searching for text in the title,
content, or <a href="#root/_help_zEY4DaJG4YT5">attributes</a> of the notes.
You also have the option to save your searches, which will create a special
search note which is visible on your navigation tree and contains the search
results as sub-items.</p>
<h2>Accessing the search</h2>
<ul>
<li>From the&nbsp;<a class="reference-link" href="#root/_help_xYmIYSP6wE3F">Launch Bar</a>,
look for the dedicated search button.</li>
<li>To limit the search to a note and its children, select <em>Search from subtree</em> from
the&nbsp;<a class="reference-link" href="#root/_help_YtSN43OrfzaA">Note tree contextual menu</a>&nbsp;or
press <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>S</kbd>.</li>
</ul>
<h2>Interaction</h2>
<p>To search for notes, click on the magnifying glass icon on the toolbar
or press the keyboard <a href="#root/_help_A9Oc6YKKc65v">shortcut</a>.</p>
<ol>
<li>Set the text to search for in the <em>Search string</em> field.
<ol>
<li>Apart from searching for words ad-literam, there is also the possibility
to search for attributes or properties of notes.</li>
<li>See the examples below for more information.</li>
</ol>
</li>
<li>To limit the search to a note and its sub-children, set a note in <em>Ancestor</em>.
<ol>
<li>This value is also pre-filled if the search is triggered from a <a href="#root/_help_OR8WJ7Iz9K4U">hoisted note</a> or
a <a href="#root/_help_9sRHySam5fXb">workspace</a>.</li>
<li>To search the entire database, keep the value empty.</li>
</ol>
</li>
<li>To limit the search to only a few levels of hierarchy (e.g. look in sub-children
but not in sub-sub-children of a note), set the <em>depth</em> field to one
of the provided values.</li>
<li>In addition to that, the search can be configured via the <em>Add search options</em> buttons,
as described in the follow-up section.</li>
<li>Press <em>Search</em> to trigger the search. The results are displayed below
the search configuration pane.</li>
<li>The <em>Search &amp; Execute actions</em> button is only relevant if at
least one action has been added (as described in the section below).</li>
<li>The <em>Save to note</em> will create a new note with the search configuration.
For more information, see&nbsp;<a class="reference-link" href="#root/_help_m523cpzocqaD">Saved Search</a>.</li>
</ol>
<h2>Search options</h2>
<p>Click on which search option to apply from the Add search option section.</p>
<ul>
<li>For each search option selected, the search configuration will update
to reveal the entry. Each search option will have its own configuration.</li>
<li>To remove a search option, simply press the X button to the right of it.</li>
</ul>
<p>The options available are:</p>
<ol>
<li>Search script
<ol>
<li>This feature allows writing a&nbsp;<a class="reference-link" href="#root/_help_6f9hih2hXXZk">Code</a>&nbsp;note
that will handle the search on its own.</li>
</ol>
</li>
<li>Fast search
<ol>
<li>The search will not look into the content of the notes, but it will still
look into note titles and attributes, relations (based on the search query).</li>
<li>This method can speed up the search considerably for large <a href="#root/_help_wX4HbRucYSDD">databases</a>.</li>
</ol>
</li>
<li>Include archived
<ol>
<li><a class="reference-link" href="#root/_help_MKmLg5x6xkor">Archived Notes</a>&nbsp;will
also be included in the results, whereas otherwise they would be ignored.</li>
</ol>
</li>
<li>Order by
<ol>
<li>Allows changing the criteria for ordering the results, for example to
order by creation date or alphabetically instead of by relevancy (default).</li>
<li>It's also possible to change the order (ascending or descending) of the
results.</li>
</ol>
</li>
<li>Limit
<ol>
<li>Limits the results to a given maximum.</li>
<li>This can help if the number of results would otherwise be high, at the
cost of not being able to view all the results.</li>
</ol>
</li>
<li>Debug
<ol>
<li>This will print additional information in the server log (see&nbsp;
<a
class="reference-link" href="#root/_help_qzNzp9LYQyPT">Error logs</a>), regarding how the search expression was parsed.</li>
<li>This function is especially useful after understanding the search functionality
in detail, in order to determine why a complex search query is not working
as expected.</li>
</ol>
</li>
<li>Action
<ol>
<li>Apart from just searching, it is also possible to apply actions such as
to add a label or a relation to the notes that have been matched by the
search.</li>
<li>Unlike other search configurations, here it's possible to apply the same
action multiple times (i.e. in order to be able to apply multiple labels
to notes).</li>
<li>The actions given are the same as the ones in&nbsp;<a class="reference-link"
href="#root/_help_ivYnonVFBxbQ">Bulk Actions</a>, which is an alternative
for operating directly with notes within the&nbsp;<a class="reference-link"
href="#root/_help_oPVyFC7WL2Lp">Note Tree</a>.</li>
<li>After defining the actions, first press <em>Search</em> to check the matched
notes and then press <em>Search &amp; Execute actions</em> to trigger the
actions.</li>
</ol>
</li>
</ol>
<h3>Simple Note Search Examples</h3>
<ul>
<li><code>rings tolkien</code>: Full-text search to find notes containing
both "rings" and "tolkien".</li>
<li><code>"The Lord of the Rings" Tolkien</code>: Full-text search where "The
Lord of the Rings" must match exactly.</li>
<li><code>note.content *=* rings OR note.content *=* tolkien</code>: Find
notes containing "rings" or "tolkien" in their content.</li>
<li><code>towers #book</code>: Combine full-text and attribute search to find
notes containing "towers" and having the "book" label.</li>
<li><code>towers #book or #author</code>: Search for notes containing "towers"
and having either the "book" or "author" label.</li>
<li><code>towers #!book</code>: Search for notes containing "towers" and not
having the "book" label.</li>
<li><code>#book #publicationYear = 1954</code>: Find notes with the "book"
label and "publicationYear" set to 1954.</li>
<li><code>#genre *=* fan</code>: Find notes with the "genre" label containing
the substring "fan". Additional operators include <code>*=*</code> for "contains", <code>=*</code> for
"starts with", <code>*=</code> for "ends with", and <code>!=</code> for "is
not equal to".</li>
<li><code>#book #publicationYear &gt;= 1950 #publicationYear &lt; 1960</code>:
Use numeric operators to find all books published in the 1950s.</li>
<li><code>#dateNote &gt;= TODAY-30</code>: A "smart search" to find notes
with the "dateNote" label within the last 30 days. Supported smart values
include NOW +- seconds, TODAY +- days, MONTH +- months, YEAR +- years.</li>
<li><code>~author.title *=* Tolkien</code>: Find notes related to an author
whose title contains "Tolkien".</li>
<li><code>#publicationYear %= '19[0-9]{2}'</code>: Use the '%=' operator to
match a regular expression (regex). This feature has been available since
Trilium 0.52.</li>
</ul>
<h3>Advanced Use Cases</h3>
<ul>
<li><code>~author.relations.son.title = 'Christopher Tolkien'</code>: Search
for notes with an "author" relation to a note that has a "son" relation
to "Christopher Tolkien". This can be modeled with the following note structure:
<ul>
<li>Books
<ul>
<li>From the&nbsp;<a class="reference-link" href="#root/_help_xYmIYSP6wE3F">Launch Bar</a>,
look for the dedicated search button.</li>
<li>To limit the search to a note and its children, select <em>Search from subtree</em> from
the&nbsp;<a class="reference-link" href="#root/_help_YtSN43OrfzaA">Note tree contextual menu</a>&nbsp;or
press <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>S</kbd>.</li>
</ul>
<h2>Interaction</h2>
<p>To search for notes, click on the magnifying glass icon on the toolbar
or press the keyboard <a href="#root/_help_A9Oc6YKKc65v">shortcut</a>.</p>
<ol>
<li>Set the text to search for in the <em>Search string</em> field.
<ol>
<li>Apart from searching for words ad-literam, there is also the possibility
to search for attributes or properties of notes.</li>
<li>See the examples below for more information.</li>
</ol>
</li>
<li>To limit the search to a note and its sub-children, set a note in <em>Ancestor</em>.
<ol>
<li>This value is also pre-filled if the search is triggered from a <a href="#root/_help_OR8WJ7Iz9K4U">hoisted note</a> or
a <a href="#root/_help_9sRHySam5fXb">workspace</a>.</li>
<li>To search the entire database, keep the value empty.</li>
</ol>
</li>
<li>To limit the search to only a few levels of hierarchy (e.g. look in sub-children
but not in sub-sub-children of a note), set the <em>depth</em> field to one
of the provided values.</li>
<li>In addition to that, the search can be configured via the <em>Add search options</em> buttons,
as described in the follow-up section.</li>
<li>Press <em>Search</em> to trigger the search. The results are displayed below
the search configuration pane.</li>
<li>The <em>Search &amp; Execute actions</em> button is only relevant if at
least one action has been added (as described in the section below).</li>
<li>The <em>Save to note</em> will create a new note with the search configuration.
For more information, see&nbsp;<a class="reference-link" href="#root/_help_m523cpzocqaD">Saved Search</a>.</li>
</ol>
<h2>Search options</h2>
<p>Click on which search option to apply from the Add search option section.</p>
<ul>
<li>For each search option selected, the search configuration will update
to reveal the entry. Each search option will have its own configuration.</li>
<li>To remove a search option, simply press the X button to the right of it.</li>
</ul>
<p>The options available are:</p>
<ol>
<li>Search script
<ol>
<li>This feature allows writing a&nbsp;<a class="reference-link" href="#root/_help_6f9hih2hXXZk">Code</a>&nbsp;note
that will handle the search on its own.</li>
</ol>
</li>
<li>Fast search
<ol>
<li>The search will not look into the content of the notes, but it will still
look into note titles and attributes, relations (based on the search query).</li>
<li>This method can speed up the search considerably for large <a href="#root/_help_wX4HbRucYSDD">databases</a>.</li>
</ol>
</li>
<li>Include archived
<ol>
<li><a class="reference-link" href="#root/_help_MKmLg5x6xkor">Archived Notes</a>&nbsp;will
also be included in the results, whereas otherwise they would be ignored.</li>
</ol>
</li>
<li>Order by
<ol>
<li>Allows changing the criteria for ordering the results, for example to
order by creation date or alphabetically instead of by relevancy (default).</li>
<li>It's also possible to change the order (ascending or descending) of the
results.</li>
</ol>
</li>
<li>Limit
<ol>
<li>Limits the results to a given maximum.</li>
<li>This can help if the number of results would otherwise be high, at the
cost of not being able to view all the results.</li>
</ol>
</li>
<li>Debug
<ol>
<li>This will print additional information in the server log (see&nbsp;
<a
class="reference-link" href="#root/_help_qzNzp9LYQyPT">Error logs</a>), regarding how the search expression was parsed.</li>
<li>This function is especially useful after understanding the search functionality
in detail, in order to determine why a complex search query is not working
as expected.</li>
</ol>
</li>
<li>Action
<ol>
<li>Apart from just searching, it is also possible to apply actions such as
to add a label or a relation to the notes that have been matched by the
search.</li>
<li>Unlike other search configurations, here it's possible to apply the same
action multiple times (i.e. in order to be able to apply multiple labels
to notes).</li>
<li>The actions given are the same as the ones in&nbsp;<a class="reference-link"
href="#root/_help_ivYnonVFBxbQ">Bulk Actions</a>, which is an alternative
for operating directly with notes within the&nbsp;<a class="reference-link"
href="#root/_help_oPVyFC7WL2Lp">Note Tree</a>.</li>
<li>After defining the actions, first press <em>Search</em> to check the matched
notes and then press <em>Search &amp; Execute actions</em> to trigger the
actions.</li>
</ol>
</li>
</ol>
<h3>Simple Note Search Examples</h3>
<ul>
<li><code>rings tolkien</code>: Full-text search to find notes containing
both "rings" and "tolkien".</li>
<li><code>"The Lord of the Rings" Tolkien</code>: Full-text search where "The
Lord of the Rings" must match exactly.</li>
<li><code>note.content *=* rings OR note.content *=* tolkien</code>: Find
notes containing "rings" or "tolkien" in their content.</li>
<li><code>towers #book</code>: Combine full-text and attribute search to find
notes containing "towers" and having the "book" label.</li>
<li><code>towers #book or #author</code>: Search for notes containing "towers"
and having either the "book" or "author" label.</li>
<li><code>towers #!book</code>: Search for notes containing "towers" and not
having the "book" label.</li>
<li><code>#book #publicationYear = 1954</code>: Find notes with the "book"
label and "publicationYear" set to 1954.</li>
<li><code>#genre *=* fan</code>: Find notes with the "genre" label containing
the substring "fan". Additional operators include <code>*=*</code> for "contains", <code>=*</code> for
"starts with", <code>*=</code> for "ends with", and <code>!=</code> for "is
not equal to".</li>
<li><code>#book #publicationYear &gt;= 1950 #publicationYear &lt; 1960</code>:
Use numeric operators to find all books published in the 1950s.</li>
<li><code>#dateNote &gt;= TODAY-30</code>: A "smart search" to find notes
with the "dateNote" label within the last 30 days. Supported smart values
include NOW +- seconds, TODAY +- days, MONTH +- months, YEAR +- years.</li>
<li><code>~author.title *=* Tolkien</code>: Find notes related to an author
whose title contains "Tolkien".</li>
<li><code>#publicationYear %= '19[0-9]{2}'</code>: Use the '%=' operator to
match a regular expression (regex). This feature has been available since
Trilium 0.52.</li>
</ul>
<h3>Advanced Use Cases</h3>
<ul>
<li><code>~author.relations.son.title = 'Christopher Tolkien'</code>: Search
for notes with an "author" relation to a note that has a "son" relation
to "Christopher Tolkien". This can be modeled with the following note structure:
<li>Lord of the Rings
<ul>
<li>Books
<ul>
<li>Lord of the Rings
<ul>
<li>label: “book”</li>
<li>relation: “author” points to “J. R. R. Tolkien” note</li>
</ul>
</li>
</ul>
</li>
<li>People
<ul>
<li>J. R. R. Tolkien
<ul>
<li>relation: “son” points to "Christopher Tolkien" note</li>
<li>Christopher Tolkien</li>
</ul>
</li>
</ul>
</li>
<li>label: “book”</li>
<li>relation: “author” points to “J. R. R. Tolkien” note</li>
</ul>
</li>
<li><code>~author.title *= Tolkien OR (#publicationDate &gt;= 1954 AND #publicationDate &lt;= 1960)</code>:
Use boolean expressions and parentheses to group expressions. Note that
expressions starting with a parenthesis need an "expression separator sign"
(# or ~) prepended.</li>
<li><code>note.parents.title = 'Books'</code>: Find notes with a parent named
"Books".</li>
<li><code>note.parents.parents.title = 'Books'</code>: Find notes with a grandparent
named "Books".</li>
<li><code>note.ancestors.title = 'Books'</code>: Find notes with an ancestor
named "Books".</li>
<li><code>note.children.title = 'sub-note'</code>: Find notes with a child
named "sub-note".</li>
</ul>
<h3>Search with Note Properties</h3>
<p>Notes have properties that can be used in searches, such as <code>noteId</code>, <code>dateModified</code>, <code>dateCreated</code>, <code>isProtected</code>, <code>type</code>, <code>title</code>, <code>text</code>, <code>content</code>, <code>rawContent</code>, <code>ownedLabelCount</code>, <code>labelCount</code>, <code>ownedRelationCount</code>, <code>relationCount</code>, <code>ownedRelationCountIncludingLinks</code>, <code>relationCountIncludingLinks</code>, <code>ownedAttributeCount</code>, <code>attributeCount</code>, <code>targetRelationCount</code>, <code>targetRelationCountIncludingLinks</code>, <code>parentCount</code>, <code>childrenCount</code>, <code>isArchived</code>, <code>contentSize</code>, <code>noteSize</code>,
and <code>revisionCount</code>.</p>
<p>These properties can be accessed via the <code>note.</code> prefix, e.g., <code>note.type = code AND note.mime = 'application/json'</code>.</p>
<h3>Order by and Limit</h3><pre><code class="language-text-x-trilium-auto">#author=Tolkien orderBy #publicationDate desc, note.title limit 10</code></pre>
<p>This example will:</p>
<ol>
<li>Find notes with the author label "Tolkien".</li>
<li>Order the results by <code>publicationDate</code> in descending order.</li>
<li>Use <code>note.title</code> as a secondary ordering if publication dates
are equal.</li>
<li>Limit the results to the first 10 notes.</li>
</ol>
<h3>Negation</h3>
<p>Some queries can only be expressed with negation:</p><pre><code class="language-text-x-trilium-auto">#book AND not(note.ancestor.title = 'Tolkien')</code></pre>
<p>This query finds all book notes not in the "Tolkien" subtree.</p>
<h2>Under the Hood</h2>
<h3>Label and Relation Shortcuts</h3>
<p>The "full" syntax for searching by labels is:</p><pre><code class="language-text-x-trilium-auto">note.labels.publicationYear = 1954</code></pre>
<p>For relations:</p><pre><code class="language-text-x-trilium-auto">note.relations.author.title *=* Tolkien</code></pre>
<p>However, common label and relation searches have shortcut syntax:</p><pre><code class="language-text-x-trilium-auto">#publicationYear = 1954
</li>
<li>People
<ul>
<li>J. R. R. Tolkien
<ul>
<li>relation: “son” points to "Christopher Tolkien" note</li>
<li>Christopher Tolkien</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li><code>~author.title *= Tolkien OR (#publicationDate &gt;= 1954 AND #publicationDate &lt;= 1960)</code>:
Use boolean expressions and parentheses to group expressions. Note that
expressions starting with a parenthesis need an "expression separator sign"
(# or ~) prepended.</li>
<li><code>note.parents.title = 'Books'</code>: Find notes with a parent named
"Books".</li>
<li><code>note.parents.parents.title = 'Books'</code>: Find notes with a grandparent
named "Books".</li>
<li><code>note.ancestors.title = 'Books'</code>: Find notes with an ancestor
named "Books".</li>
<li><code>note.children.title = 'sub-note'</code>: Find notes with a child
named "sub-note".</li>
</ul>
<h3>Search with Note Properties</h3>
<p>Notes have properties that can be used in searches, such as <code>noteId</code>, <code>dateModified</code>, <code>dateCreated</code>, <code>isProtected</code>, <code>type</code>, <code>title</code>, <code>text</code>, <code>content</code>, <code>rawContent</code>, <code>ownedLabelCount</code>, <code>labelCount</code>, <code>ownedRelationCount</code>, <code>relationCount</code>, <code>ownedRelationCountIncludingLinks</code>, <code>relationCountIncludingLinks</code>, <code>ownedAttributeCount</code>, <code>attributeCount</code>, <code>targetRelationCount</code>, <code>targetRelationCountIncludingLinks</code>, <code>parentCount</code>, <code>childrenCount</code>, <code>isArchived</code>, <code>contentSize</code>, <code>noteSize</code>,
and <code>revisionCount</code>.</p>
<p>These properties can be accessed via the <code>note.</code> prefix, e.g., <code>note.type = code AND note.mime = 'application/json'</code>.</p>
<h3>Order by and Limit</h3><pre><code class="language-text-x-trilium-auto">#author=Tolkien orderBy #publicationDate desc, note.title limit 10</code></pre>
<p>This example will:</p>
<ol>
<li>Find notes with the author label "Tolkien".</li>
<li>Order the results by <code>publicationDate</code> in descending order.</li>
<li>Use <code>note.title</code> as a secondary ordering if publication dates
are equal.</li>
<li>Limit the results to the first 10 notes.</li>
</ol>
<h3>Negation</h3>
<p>Some queries can only be expressed with negation:</p><pre><code class="language-text-x-trilium-auto">#book AND not(note.ancestor.title = 'Tolkien')</code></pre>
<p>This query finds all book notes not in the "Tolkien" subtree.</p>
<h2>Under the Hood</h2>
<h3>Label and Relation Shortcuts</h3>
<p>The "full" syntax for searching by labels is:</p><pre><code class="language-text-x-trilium-auto">note.labels.publicationYear = 1954</code></pre>
<p>For relations:</p><pre><code class="language-text-x-trilium-auto">note.relations.author.title *=* Tolkien</code></pre>
<p>However, common label and relation searches have shortcut syntax:</p><pre><code class="language-text-x-trilium-auto">#publicationYear = 1954
#author.title *=* Tolkien</code></pre>
<h3>Separating Full-Text and Attribute Parts</h3>
<p>Search syntax allows combining full-text search with attribute-based search
seamlessly. For example, <code>tolkien #book</code> contains:</p>
<ol>
<li>Full-text tokens - <code>tolkien</code>
</li>
<li>Attribute expressions - <code>#book</code>
</li>
</ol>
<p>Trilium detects the separation between full text search and attribute/property
search by looking for certain special characters or words that denote attributes
and properties (e.g., #, ~, note.). If you need to include these in full-text
search, escape them with a backslash so they are processed as regular text:</p><pre><code class="language-text-x-trilium-auto">"note.txt"
<h3>Separating Full-Text and Attribute Parts</h3>
<p>Search syntax allows combining full-text search with attribute-based search
seamlessly. For example, <code>tolkien #book</code> contains:</p>
<ol>
<li>Full-text tokens - <code>tolkien</code>
</li>
<li>Attribute expressions - <code>#book</code>
</li>
</ol>
<p>Trilium detects the separation between full text search and attribute/property
search by looking for certain special characters or words that denote attributes
and properties (e.g., #, ~, note.). If you need to include these in full-text
search, escape them with a backslash so they are processed as regular text:</p><pre><code class="language-text-x-trilium-auto">"note.txt"
\#hash
#myLabel = 'Say "Hello World"'</code></pre>
<h3>Escaping Special Characters</h3>
<p>Special characters can be enclosed in quotes or escaped with a backslash
to be used in full-text search:</p><pre><code class="language-text-x-trilium-auto">"note.txt"
<h3>Escaping Special Characters</h3>
<p>Special characters can be enclosed in quotes or escaped with a backslash
to be used in full-text search:</p><pre><code class="language-text-x-trilium-auto">"note.txt"
\#hash
#myLabel = 'Say "Hello World"'</code></pre>
<p>Three types of quotes are supported: single, double, and backtick.</p>
<h3>Type Coercion</h3>
<p>Label values are technically strings but can be coerced for numeric comparisons:</p><pre><code class="language-text-x-trilium-auto">note.dateCreated =* '2019-05'</code></pre>
<p>This finds notes created in May 2019. Numeric operators like <code>#publicationYear &gt;= 1960</code> convert
string values to numbers for comparison.</p>
<h2>Auto-Trigger Search from URL</h2>
<p>You can open Trilium and automatically trigger a search by including the
search <a href="https://meyerweb.com/eric/tools/dencoder/">url encoded</a> string
in the URL:</p>
<p><code>http://localhost:8080/#?searchString=abc</code>
</p>
</div>
</div>
</body>
</html>
<p>Three types of quotes are supported: single, double, and backtick.</p>
<h3>Type Coercion</h3>
<p>Label values are technically strings but can be coerced for numeric comparisons:</p><pre><code class="language-text-x-trilium-auto">note.dateCreated =* '2019-05'</code></pre>
<p>This finds notes created in May 2019. Numeric operators like <code>#publicationYear &gt;= 1960</code> convert
string values to numbers for comparison.</p>
<h2>Auto-Trigger Search from URL</h2>
<p>You can open Trilium and automatically trigger a search by including the
search <a href="https://meyerweb.com/eric/tools/dencoder/">url encoded</a> string
in the URL:</p>
<p><code>http://localhost:8080/#?searchString=abc</code>
</p>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 63 KiB

View File

@@ -1,35 +1,15 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../style.css">
<base target="_parent">
<title data-trilium-title>Similar Notes</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Similar Notes</h1>
<div class="ck-content">
<figure class="image image-style-align-center">
<img style="aspect-ratio:1626/540;" src="Similar Notes_image.png" width="1626"
height="540">
</figure>
<p>The Similar Notes feature tries to identify notes that relate to the current
note by looking at the content of the notes, their relationships, as well
as the date they were created.</p>
<p>To access the list of similar notes, press the “Similar Notes” tab in
the&nbsp;<a class="reference-link" href="#root/_help_BlN9DFI679QC">Ribbon</a>.</p>
<h2>Interaction</h2>
<ul>
<li>Hover over a note to see a short preview of the note.</li>
<li>Click over a note to open it in the current view.</li>
<li><kbd>Ctrl</kbd> + click a note to open it in a separate tab.</li>
</ul>
</div>
</div>
</body>
</html>
<figure class="image image-style-align-center">
<img style="aspect-ratio:1626/540;" src="Similar Notes_image.png" width="1626"
height="540">
</figure>
<p>The Similar Notes feature tries to identify notes that relate to the current
note by looking at the content of the notes, their relationships, as well
as the date they were created.</p>
<p>To access the list of similar notes, press the “Similar Notes” tab in
the&nbsp;<a class="reference-link" href="#root/_help_BlN9DFI679QC">Ribbon</a>.</p>
<h2>Interaction</h2>
<ul>
<li>Hover over a note to see a short preview of the note.</li>
<li>Click over a note to open it in the current view.</li>
<li><kbd>Ctrl</kbd> + click a note to open it in a separate tab.</li>
</ul>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 KiB

After

Width:  |  Height:  |  Size: 53 KiB

View File

@@ -1,46 +1,26 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../style.css">
<base target="_parent">
<title data-trilium-title>Tree Concepts</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Tree Concepts</h1>
<div class="ck-content">
<p>This page explains the basic concepts related to the tree structure of
notes in TriliumNext.</p>
<h2>Note</h2>
<p>A note is the central entity in TriliumNext. For more details, see <a href="#root/_help_BFs8mudNFgCS">Note</a>.</p>
<h2>Branch</h2>
<p>A branch describes the placement of a note within the note tree. Essentially,
it is a tuple of <code>parentNoteId</code> and <code>noteId</code>, indicating
that the given note is placed as a child under the specified parent note.</p>
<p>Each note can have multiple branches, meaning any note can be placed in
multiple locations within the tree. This concept is referred to as "
<a
href="#root/_help_IakOLONlIfGI">cloning</a>."</p>
<h2>Prefix</h2>
<p>A prefix is a branch-specific title modifier for a note. If you place
your note in two different locations within the tree and want to alter
the title slightly in one of those placements, you can use a prefix.</p>
<p>To edit a prefix, right-click on the note in the tree pane and select
"Edit branch prefix."</p>
<p>The prefix is not part of the note itself and is not encrypted when the
note is protected. This can be useful if you want part of the title to
remain visible in the tree for easier navigation, even when the note is
protected.</p>
<h2>Subtree</h2>
<p>A subtree consists of a particular note (the subtree root) and all its
children and descendants. Some operations, such as exporting, work on entire
subtrees.</p>
</div>
</div>
</body>
</html>
<p>This page explains the basic concepts related to the tree structure of
notes in TriliumNext.</p>
<h2>Note</h2>
<p>A note is the central entity in TriliumNext. For more details, see <a href="#root/_help_BFs8mudNFgCS">Note</a>.</p>
<h2>Branch</h2>
<p>A branch describes the placement of a note within the note tree. Essentially,
it is a tuple of <code>parentNoteId</code> and <code>noteId</code>, indicating
that the given note is placed as a child under the specified parent note.</p>
<p>Each note can have multiple branches, meaning any note can be placed in
multiple locations within the tree. This concept is referred to as "
<a
href="#root/_help_IakOLONlIfGI">cloning</a>."</p>
<h2>Prefix</h2>
<p>A prefix is a branch-specific title modifier for a note. If you place
your note in two different locations within the tree and want to alter
the title slightly in one of those placements, you can use a prefix.</p>
<p>To edit a prefix, right-click on the note in the tree pane and select
"Edit branch prefix."</p>
<p>The prefix is not part of the note itself and is not encrypted when the
note is protected. This can be useful if you want part of the title to
remain visible in the tree for easier navigation, even when the note is
protected.</p>
<h2>Subtree</h2>
<p>A subtree consists of a particular note (the subtree root) and all its
children and descendants. Some operations, such as exporting, work on entire
subtrees.</p>

View File

@@ -1,100 +1,80 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../style.css">
<base target="_parent">
<title data-trilium-title>Workspaces</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Workspaces</h1>
<div class="ck-content">
<p>Workspace is a concept built up on top of <a href="#root/_help_OR8WJ7Iz9K4U">note hoisting</a>.
It is based on the idea that a user has several distinct spheres of interest.
An example might be "Personal" and "Work", these two spheres are quite
distinct and don't interact together. When I focus on Work, I don't really
care about personal notes.</p>
<p>So far workspace consists of these features:</p>
<ul>
<li>
<p><a href="#root/_help_OR8WJ7Iz9K4U">note hoisting</a> - you can "zoom" into
a workspace subtree to focus only on the relevant notes</p>
</li>
<li>
<p>easy entering of workspace:&nbsp;</p>
<p>
<img src="1_Workspaces_image.png">
</p>
</li>
<li>
<p>visual identification of workspace in tabs:
<br>
<img src="Workspaces_image.png">
</p>
</li>
</ul>
<h3>Configuration</h3>
<figure class="table">
<table>
<thead>
<tr>
<th>Label</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>workspace</code>
</td>
<td>Marks this note as a workspace, button to enter the workspace is controlled
by this</td>
</tr>
<tr>
<td><code>workspaceIconClass</code>
</td>
<td>defines box icon CSS class which will be used in tab when hoisted to this
note</td>
</tr>
<tr>
<td><code>workspaceTabBackgroundColor</code>
</td>
<td>CSS color used in the note tab when hoisted to this note, use any CSS
color format, e.g. "lightblue" or "#ddd". See <a href="https://www.w3schools.com/cssref/css_colors.asp">https://www.w3schools.com/cssref/css_colors.asp</a>.</td>
</tr>
<tr>
<td><code>workspaceCalendarRoot</code>
</td>
<td>Marking a note with this label will define a new per-workspace calendar
for&nbsp;<a class="reference-link" href="#root/_help_l0tKav7yLHGF">Day Notes</a>.
If there's no such note, the global calendar will be used.</td>
</tr>
<tr>
<td><code>workspaceTemplate</code>
</td>
<td>This note will appear in the selection of available template when creating
new note, but only when hoisted into a workspace containing this template</td>
</tr>
<tr>
<td><code>workspaceSearchHome</code>
</td>
<td>new search notes will be created as children of this note when hoisted
to some ancestor of this workspace note</td>
</tr>
<tr>
<td><code>workspaceInbox</code>
</td>
<td>default inbox location for new notes when hoisted to some ancestor of
this workspace note</td>
</tr>
</tbody>
</table>
</figure>
</div>
</div>
</body>
</html>
<p>Workspace is a concept built up on top of <a href="#root/_help_OR8WJ7Iz9K4U">note hoisting</a>.
It is based on the idea that a user has several distinct spheres of interest.
An example might be "Personal" and "Work", these two spheres are quite
distinct and don't interact together. When I focus on Work, I don't really
care about personal notes.</p>
<p>So far workspace consists of these features:</p>
<ul>
<li>
<p><a href="#root/_help_OR8WJ7Iz9K4U">note hoisting</a> - you can "zoom" into
a workspace subtree to focus only on the relevant notes</p>
</li>
<li>
<p>easy entering of workspace:&nbsp;</p>
<p>
<img src="1_Workspaces_image.png">
</p>
</li>
<li>
<p>visual identification of workspace in tabs:
<br>
<img src="Workspaces_image.png">
</p>
</li>
</ul>
<h3>Configuration</h3>
<figure class="table">
<table>
<thead>
<tr>
<th>Label</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>workspace</code>
</td>
<td>Marks this note as a workspace, button to enter the workspace is controlled
by this</td>
</tr>
<tr>
<td><code>workspaceIconClass</code>
</td>
<td>defines box icon CSS class which will be used in tab when hoisted to this
note</td>
</tr>
<tr>
<td><code>workspaceTabBackgroundColor</code>
</td>
<td>CSS color used in the note tab when hoisted to this note, use any CSS
color format, e.g. "lightblue" or "#ddd". See <a href="https://www.w3schools.com/cssref/css_colors.asp">https://www.w3schools.com/cssref/css_colors.asp</a>.</td>
</tr>
<tr>
<td><code>workspaceCalendarRoot</code>
</td>
<td>Marking a note with this label will define a new per-workspace calendar
for&nbsp;<a class="reference-link" href="#root/_help_l0tKav7yLHGF">Day Notes</a>.
If there's no such note, the global calendar will be used.</td>
</tr>
<tr>
<td><code>workspaceTemplate</code>
</td>
<td>This note will appear in the selection of available template when creating
new note, but only when hoisted into a workspace containing this template</td>
</tr>
<tr>
<td><code>workspaceSearchHome</code>
</td>
<td>new search notes will be created as children of this note when hoisted
to some ancestor of this workspace note</td>
</tr>
<tr>
<td><code>workspaceInbox</code>
</td>
<td>default inbox location for new notes when hoisted to some ancestor of
this workspace note</td>
</tr>
</tbody>
</table>
</figure>

View File

@@ -1,70 +1,50 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../style.css">
<base target="_parent">
<title data-trilium-title>Notes</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Notes</h1>
<div class="ck-content">
<p>Note is a central entity in Trilium. Main attributes of note are title
and content.</p>
<h3>Note types</h3>
<p>The main note type is a rich-text note type called&nbsp;<a class="reference-link"
href="#root/_help_iPIMuisry3hd">Text</a>. For diagrams and drawing there
is&nbsp;<a class="reference-link" href="#root/_help_grjYqerjn243">Canvas</a>&nbsp;and&nbsp;
<a
class="reference-link" href="#root/_help_s1aBHPd79XYj">Mermaid Diagrams</a>.</p>
<p>There are also more complex note types such as&nbsp;<a class="reference-link"
href="#root/_help_m523cpzocqaD">Saved Search</a>,&nbsp;<a class="reference-link"
href="#root/_help_HcABDtFCkbFN">Render Note</a>&nbsp;that usually go hand-in-hand
with&nbsp;<a class="reference-link" href="#root/_help_CdNpE2pqjmI6">Scripting</a>.</p>
<p>In Trilium there's no specific "folder" note type. Any note can have children
and thus be a folder.</p>
<h3>Root note</h3>
<p>There's one special note called "root note" which is root of the note
tree. All other notes are placed below it in the structure.</p>
<h3>Tree structure</h3>
<p>Importantly, note itself doesn't carry information on its placement in
note tree. See&nbsp;<a class="reference-link" href="#root/_help_IakOLONlIfGI">Cloning Notes</a>&nbsp;for
details.</p>
<p>Tree structure of notes can resemble file system - but compared to that
notes in Trilium can act as both file and directory - meaning that note
can both have its own content and have children. "Leaf note" is a note
which doesn't have any children.</p>
<h3>Deleting / undeleting notes</h3>
<p>When you delete a note in Trilium, it is actually only marked for deletion
(soft-delete) - the actual content, title, attributes etc. are not deleted,
only hidden.</p>
<p>Within (by default) 7 days, it is possible to undelete these soft-deleted
notes - open the&nbsp;<a class="reference-link" href="#root/_help_r5JGHN99bVKn">Recent Changes</a>&nbsp;dialog,
and you will see a list of all modified notes including the deleted ones.
Notes available for undeletion have a link to do so. This is kind of "trash
can" functionality known from e.g. Windows.</p>
<p>Clicking an undelete will recover the note, it's content and attributes
- note should be just as before being deleted. This action will also undelete
note's children which have been deleted in the same action.</p>
<p>To be able to undelete a note, it is necessary that deleted note's parent
must be undeleted (otherwise there's no place where we can undelete it
to). This might become a problem when you delete more notes in succession
- the solution is then undelete in the reverse order of your deletion.</p>
<p>After the 7 days (configurable) the notes will be "erased" - their title,
content, revisions and attributes will be erased, and it will not be possible
anymore to recover them (unless you restore a&nbsp;<a class="reference-link"
href="#root/_help_ODY7qQn5m2FT">Backup</a>).</p>
<h2>See also</h2>
<ul>
<li><a class="reference-link" href="#root/_help_CoFPLs3dRlXc">Read-Only Notes</a>
</li>
</ul>
</div>
</div>
</body>
</html>
<p>Note is a central entity in Trilium. Main attributes of note are title
and content.</p>
<h3>Note types</h3>
<p>The main note type is a rich-text note type called&nbsp;<a class="reference-link"
href="#root/_help_iPIMuisry3hd">Text</a>. For diagrams and drawing there
is&nbsp;<a class="reference-link" href="#root/_help_grjYqerjn243">Canvas</a>&nbsp;and&nbsp;
<a
class="reference-link" href="#root/_help_s1aBHPd79XYj">Mermaid Diagrams</a>.</p>
<p>There are also more complex note types such as&nbsp;<a class="reference-link"
href="#root/_help_m523cpzocqaD">Saved Search</a>,&nbsp;<a class="reference-link"
href="#root/_help_HcABDtFCkbFN">Render Note</a>&nbsp;that usually go hand-in-hand
with&nbsp;<a class="reference-link" href="#root/_help_CdNpE2pqjmI6">Scripting</a>.</p>
<p>In Trilium there's no specific "folder" note type. Any note can have children
and thus be a folder.</p>
<h3>Root note</h3>
<p>There's one special note called "root note" which is root of the note
tree. All other notes are placed below it in the structure.</p>
<h3>Tree structure</h3>
<p>Importantly, note itself doesn't carry information on its placement in
note tree. See&nbsp;<a class="reference-link" href="#root/_help_IakOLONlIfGI">Cloning Notes</a>&nbsp;for
details.</p>
<p>Tree structure of notes can resemble file system - but compared to that
notes in Trilium can act as both file and directory - meaning that note
can both have its own content and have children. "Leaf note" is a note
which doesn't have any children.</p>
<h3>Deleting / undeleting notes</h3>
<p>When you delete a note in Trilium, it is actually only marked for deletion
(soft-delete) - the actual content, title, attributes etc. are not deleted,
only hidden.</p>
<p>Within (by default) 7 days, it is possible to undelete these soft-deleted
notes - open the&nbsp;<a class="reference-link" href="#root/_help_r5JGHN99bVKn">Recent Changes</a>&nbsp;dialog,
and you will see a list of all modified notes including the deleted ones.
Notes available for undeletion have a link to do so. This is kind of "trash
can" functionality known from e.g. Windows.</p>
<p>Clicking an undelete will recover the note, it's content and attributes
- note should be just as before being deleted. This action will also undelete
note's children which have been deleted in the same action.</p>
<p>To be able to undelete a note, it is necessary that deleted note's parent
must be undeleted (otherwise there's no place where we can undelete it
to). This might become a problem when you delete more notes in succession
- the solution is then undelete in the reverse order of your deletion.</p>
<p>After the 7 days (configurable) the notes will be "erased" - their title,
content, revisions and attributes will be erased, and it will not be possible
anymore to recover them (unless you restore a&nbsp;<a class="reference-link"
href="#root/_help_ODY7qQn5m2FT">Backup</a>).</p>
<h2>See also</h2>
<ul>
<li><a class="reference-link" href="#root/_help_CoFPLs3dRlXc">Read-Only Notes</a>
</li>
</ul>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 340 B

After

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

@@ -1,31 +1,11 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../style.css">
<base target="_parent">
<title data-trilium-title>Archived Notes</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Archived Notes</h1>
<div class="ck-content">
<p>Archived notes are notes which have <code>archived</code> <a href="#root/_help_zEY4DaJG4YT5">attribute</a> -
either directly or <a href="#root/_help_bwZpz2ajCEwO">inherited</a>.</p>
<p>Such notes are then by default not shown in the autocomplete and in the
full text <a href="#root/_help_eIg8jdvaoNNd">search</a>.</p>
<p>This can be useful for notes which are no longer very useful but still
valuable enough to keep around without them getting too much in the way.</p>
<p>You can control whether archived notes are displayed in the note tree
with a setting:</p>
<p>
<img src="Archived Notes_hide-archiv.png">
</p>
</div>
</div>
</body>
</html>
<p>Archived notes are notes which have <code>archived</code> <a href="#root/_help_zEY4DaJG4YT5">attribute</a> -
either directly or <a href="#root/_help_bwZpz2ajCEwO">inherited</a>.</p>
<p>Such notes are then by default not shown in the autocomplete and in the
full text <a href="#root/_help_eIg8jdvaoNNd">search</a>.</p>
<p>This can be useful for notes which are no longer very useful but still
valuable enough to keep around without them getting too much in the way.</p>
<p>You can control whether archived notes are displayed in the note tree
with a setting:</p>
<p>
<img src="Archived Notes_hide-archiv.png">
</p>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -1,50 +1,30 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../style.css">
<base target="_parent">
<title data-trilium-title>Attachments</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Attachments</h1>
<div class="ck-content">
<p>A <a href="#root/_help_BFs8mudNFgCS">note</a> in Trilium can <em>own</em> one
or more attachments, which can be either images or files. These attachments
can be displayed or linked within the note that owns them.</p>
<p>This can be especially useful to include dependencies for your <a href="#root/_help_CdNpE2pqjmI6">scripts</a>.
The&nbsp;<a class="reference-link" href="#root/_help_R7abl2fc6Mxi">Weight Tracker</a>&nbsp;shows
how to use <a href="https://chartjs.org/">chartjs</a> which is attached to
the script note.</p>
<p>Each note exclusively owns its attachments, meaning attachments cannot
be shared or linked from one note to another. If an attachment link is
copied to a different note, the attachment itself is duplicated, and the
copies are managed independently thereafter.</p>
<p>Attachments, especially image files, are the recommended method for embedding
visuals in notes. It is important to link image attachments within the
text of the owning note; otherwise, they will be automatically deleted
after a configurable timeout period if not referenced.</p>
<h2>Converting notes to attachments</h2>
<p><a class="reference-link" href="#root/_help_W8vYD3Q1zjCR">File</a>&nbsp;notes
can be easily converted to attachments of the parent note.</p>
<p>To do so:</p>
<ul>
<li>For a single note, press the context menu from the&nbsp;<a class="reference-link"
href="#root/_help_8YBEPzcpUgxw">Note buttons</a>&nbsp;and select <em>Convert into attachment</em>.</li>
<li>For multiple notes, select the given notes in the&nbsp;<a class="reference-link"
href="#root/_help_oPVyFC7WL2Lp">Note Tree</a>, right click → Advanced →
Convert to attachment.</li>
</ul>
<h2>Attachment previews</h2>
<p>Attachments share the same content preview for images, videos, PDFs, etc.
as the&nbsp;<a class="reference-link" href="#root/_help_W8vYD3Q1zjCR">File</a>&nbsp;note
type.</p>
</div>
</div>
</body>
</html>
<p>A <a href="#root/_help_BFs8mudNFgCS">note</a> in Trilium can <em>own</em> one
or more attachments, which can be either images or files. These attachments
can be displayed or linked within the note that owns them.</p>
<p>This can be especially useful to include dependencies for your <a href="#root/_help_CdNpE2pqjmI6">scripts</a>.
The&nbsp;<a class="reference-link" href="#root/_help_R7abl2fc6Mxi">Weight Tracker</a>&nbsp;shows
how to use <a href="https://chartjs.org/">chartjs</a> which is attached to
the script note.</p>
<p>Each note exclusively owns its attachments, meaning attachments cannot
be shared or linked from one note to another. If an attachment link is
copied to a different note, the attachment itself is duplicated, and the
copies are managed independently thereafter.</p>
<p>Attachments, especially image files, are the recommended method for embedding
visuals in notes. It is important to link image attachments within the
text of the owning note; otherwise, they will be automatically deleted
after a configurable timeout period if not referenced.</p>
<h2>Converting notes to attachments</h2>
<p><a class="reference-link" href="#root/_help_W8vYD3Q1zjCR">File</a>&nbsp;notes
can be easily converted to attachments of the parent note.</p>
<p>To do so:</p>
<ul>
<li>For a single note, press the context menu from the&nbsp;<a class="reference-link"
href="#root/_help_8YBEPzcpUgxw">Note buttons</a>&nbsp;and select <em>Convert into attachment</em>.</li>
<li>For multiple notes, select the given notes in the&nbsp;<a class="reference-link"
href="#root/_help_oPVyFC7WL2Lp">Note Tree</a>, right click → Advanced →
Convert to attachment.</li>
</ul>
<h2>Attachment previews</h2>
<p>Attachments share the same content preview for images, videos, PDFs, etc.
as the&nbsp;<a class="reference-link" href="#root/_help_W8vYD3Q1zjCR">File</a>&nbsp;note
type.</p>

View File

@@ -1,122 +1,102 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../style.css">
<base target="_parent">
<title data-trilium-title>Cloning Notes</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Cloning Notes</h1>
<div class="ck-content">
<h2>Motivation</h2>
<p>Trilium's core feature is the ability to structure your notes into hierarchical
tree-like structure.</p>
<p>It is expected then that you'll have an elaborate and deep note hierarchy
- each subtree will represent a more refined and specialized view of your
knowledge base.</p>
<p>This is a pretty powerful approach, but it also carries a hidden assumption
that each "subtopic" is "owned" by one parent. I'll illustrate this with
an example - let's say my basic structure is this:</p>
<h2>Motivation</h2>
<p>Trilium's core feature is the ability to structure your notes into hierarchical
tree-like structure.</p>
<p>It is expected then that you'll have an elaborate and deep note hierarchy
- each subtree will represent a more refined and specialized view of your
knowledge base.</p>
<p>This is a pretty powerful approach, but it also carries a hidden assumption
that each "subtopic" is "owned" by one parent. I'll illustrate this with
an example - let's say my basic structure is this:</p>
<ul>
<li>Technology
<ul>
<li>Programming
<ul>
<li>Technology
<li>Kotlin</li>
<li>JavaScript</li>
</ul>
</li>
<li>Operating systems
<ul>
<li>Linux</li>
<li>Windows</li>
</ul>
</li>
</ul>
</li>
</ul>
<p>Now, I'm starting to learn about <a href="https://en.wikipedia.org/wiki/Bash_(Unix_shell)">Bash</a> and
would like to create notes related to this topic. But now I'm facing a
problem of where to categorize this. The issue here is that Bash is both
a programming language and a tool (shell) very much tied into Linux. It
seems it belongs to both of these, I can't (and don't want to) choose one
over the other.</p>
<h2>Solution</h2>
<p>The solution to the problem shown above is to allow notes to have multiple
parents.</p>
<p>I call these "clones", but that is a bit misleading - there's no original
and cloned note - the notes in both of the parents categories are identical.</p>
<p>Another misleading thing about "cloning" is that it suggests that a copy
of the note has been made. That's not really true, the note itself stays
in just one original, it is just referenced in multiple places in the tree
hierarchy. So changing it in one category changes it in all the others,
because they're all the same note.</p>
<p>Here's the final structure with cloning:</p>
<ul>
<li>Technology
<ul>
<li>Programming
<ul>
<li>Kotlin</li>
<li>JavaScript</li>
<li>Bash
<ul>
<li>Programming
<ul>
<li>Kotlin</li>
<li>JavaScript</li>
</ul>
</li>
<li>Operating systems
<ul>
<li>Linux</li>
<li>Windows</li>
</ul>
</li>
<li>some sub-notes ...</li>
</ul>
</li>
</ul>
<p>Now, I'm starting to learn about <a href="https://en.wikipedia.org/wiki/Bash_(Unix_shell)">Bash</a> and
would like to create notes related to this topic. But now I'm facing a
problem of where to categorize this. The issue here is that Bash is both
a programming language and a tool (shell) very much tied into Linux. It
seems it belongs to both of these, I can't (and don't want to) choose one
over the other.</p>
<h2>Solution</h2>
<p>The solution to the problem shown above is to allow notes to have multiple
parents.</p>
<p>I call these "clones", but that is a bit misleading - there's no original
and cloned note - the notes in both of the parents categories are identical.</p>
<p>Another misleading thing about "cloning" is that it suggests that a copy
of the note has been made. That's not really true, the note itself stays
in just one original, it is just referenced in multiple places in the tree
hierarchy. So changing it in one category changes it in all the others,
because they're all the same note.</p>
<p>Here's the final structure with cloning:</p>
</li>
<li>Operating systems
<ul>
<li>Technology
<li>Linux
<ul>
<li>Programming
<li>Bash
<ul>
<li>Kotlin</li>
<li>JavaScript</li>
<li>Bash
<ul>
<li>some sub-notes ...</li>
</ul>
</li>
</ul>
</li>
<li>Operating systems
<ul>
<li>Linux
<ul>
<li>Bash
<ul>
<li>some sub-notes ...</li>
</ul>
</li>
</ul>
</li>
<li>Windows</li>
<li>some sub-notes ...</li>
</ul>
</li>
</ul>
</li>
<li>Windows</li>
</ul>
<p>So now the "Bash" subtree appears on multiple locations in the hierarchy.
Both the Bash subtrees are the same and contain the same sub-categories
and notes.</p>
<h3>Demo</h3>
<p>
<img src="Cloning Notes_create-clone.gif">
</p>
<p>In the demo, you can see how a clone can be created using the context
menu. It's possible to do this also using the Add Link dialog or with <kbd>Ctrl</kbd>+<kbd>C</kbd> and <kbd>Ctrl</kbd>+<kbd>V</kbd>
<a
href="#root/_help_A9Oc6YKKc65v">keyboard shortcuts</a>.</p>
<p>As seen in the demo, you can view the list of all available clones in
the "Note Paths" tab in the Ribbon toolbar.</p>
<p>Titles of cloned notes in the tree view have an asterisk to the right
to easily see that the note is also placed into some other location.</p>
<h2>Deleting notes/clones</h2>
<p>With clones, it might not be immediately obvious how deleting works.</p>
<p>If you try to delete a note, it works like this:</p>
<ol>
<li>if the note has multiple clones, delete just this clone and leave the
actual note (and its other clones) as it is.</li>
<li>if this note doesn't have any other clones, delete the note
<ul>
<li>Run the whole process starting with 1. on all note's children notes</li>
</ul>
</li>
</ol>
</div>
</div>
</body>
</html>
</li>
</ul>
</li>
</ul>
<p>So now the "Bash" subtree appears on multiple locations in the hierarchy.
Both the Bash subtrees are the same and contain the same sub-categories
and notes.</p>
<h3>Demo</h3>
<p>
<img src="Cloning Notes_create-clone.gif">
</p>
<p>In the demo, you can see how a clone can be created using the context
menu. It's possible to do this also using the Add Link dialog or with <kbd>Ctrl</kbd>+<kbd>C</kbd> and <kbd>Ctrl</kbd>+<kbd>V</kbd>
<a
href="#root/_help_A9Oc6YKKc65v">keyboard shortcuts</a>.</p>
<p>As seen in the demo, you can view the list of all available clones in
the "Note Paths" tab in the Ribbon toolbar.</p>
<p>Titles of cloned notes in the tree view have an asterisk to the right
to easily see that the note is also placed into some other location.</p>
<h2>Deleting notes/clones</h2>
<p>With clones, it might not be immediately obvious how deleting works.</p>
<p>If you try to delete a note, it works like this:</p>
<ol>
<li>if the note has multiple clones, delete just this clone and leave the
actual note (and its other clones) as it is.</li>
<li>if this note doesn't have any other clones, delete the note
<ul>
<li>Run the whole process starting with 1. on all note's children notes</li>
</ul>
</li>
</ol>

View File

@@ -1,29 +1,9 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../../style.css">
<base target="_parent">
<title data-trilium-title>Branch prefix</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Branch prefix</h1>
<div class="ck-content">
<p>Since a single note can appear into multiple places in the&nbsp;<a class="reference-link"
href="#root/_help_oPVyFC7WL2Lp">Note Tree</a>&nbsp;via a process called&nbsp;
<a
class="reference-link" href="#root/_help_IakOLONlIfGI">Cloning Notes</a>, it's recommended to choose a generalized name that
fits into all locations instead of something more specific to avoid confusion.</p>
<p>In some cases this isn't possible so Trilium provides "branch prefixes",
which is shown before the note name in the tree and as such provides a
specific kind of context.</p>
<p>The prefix is location-specific, so it's displayed only in the note tree.</p>
</div>
</div>
</body>
</html>
<p>Since a single note can appear into multiple places in the&nbsp;<a class="reference-link"
href="#root/_help_oPVyFC7WL2Lp">Note Tree</a>&nbsp;via a process called&nbsp;
<a
class="reference-link" href="#root/_help_IakOLONlIfGI">Cloning Notes</a>, it's recommended to choose a generalized name that
fits into all locations instead of something more specific to avoid confusion.</p>
<p>In some cases this isn't possible so Trilium provides "branch prefixes",
which is shown before the note name in the tree and as such provides a
specific kind of context.</p>
<p>The prefix is location-specific, so it's displayed only in the note tree.</p>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 367 KiB

After

Width:  |  Height:  |  Size: 367 KiB

View File

@@ -1,62 +1,42 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../style.css">
<base target="_parent">
<title data-trilium-title>Export as PDF</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Export as PDF</h1>
<div class="ck-content">
<p>
<img src="Export as PDF_image.png">
</p>
<p>Screenshot of the note contextual menu indicating the “Export as PDF”
option.</p>
<p>On the desktop application of Trilium it is possible to export a note
as PDF. On the server or PWA (mobile), the option is not available due
to technical constraints and it will be hidden.</p>
<p>To print a note, select the
<img src="1_Export as PDF_image.png">button to the right of the note and select <em>Export as PDF</em>.</p>
<p>Afterwards you will be prompted to select where to save the PDF file.</p>
<h2>Automatic opening of the file</h2>
<p>When the PDF is exported, it is automatically opened with the system default
application for easy preview.</p>
<p>Note that if you are using Linux with the GNOME desktop environment, sometimes
the default application might seem incorrect (such as opening in GIMP).
This is because it uses Gnome's “Recommended applications” list.</p>
<p>To solve this, you can change the recommended application for PDFs via
this command line. First, list the available applications via <code>gio mime application/pdf</code> and
then set the desired one. For example to use GNOME's Evince:</p><pre><code class="language-text-x-trilium-auto">gio mime application/pdf</code></pre>
<h2>Reporting issues with the rendering</h2>
<p>Should you encounter any visual issues in the resulting PDF file (e.g.
a table does not fit properly, there is cut off text, etc.) feel free to
<a
href="#root/_help_wy8So3yZZlH9">report the issue</a>. In this case, it's best to offer a sample note (click
on the
<img src="1_Export as PDF_image.png">button, select Export note → This note and all of its descendants → HTML
in ZIP archive). Make sure not to accidentally leak any personal information.</p>
<h2>Landscape mode</h2>
<p>When exporting to PDF, there are no customizable settings such as page
orientation, size, etc. However, it is possible to specify a given note
to be printed as a PDF in landscape mode by adding the <code>#printLandscape</code> attribute
to it (see&nbsp;<a class="reference-link" href="#root/_help_zEY4DaJG4YT5">Attributes</a>).</p>
<h2>Page size</h2>
<p>By default, the resulting PDF will be in Letter format. It is possible
to adjust it to another page size via the <code>#printPageSize</code> attribute,
with one of the following values: <code>A0</code>, <code>A1</code>, <code>A2</code>, <code>A3</code>, <code>A4</code>, <code>A5</code>, <code>A6</code>, <code>Legal</code>, <code>Letter</code>, <code>Tabloid</code>, <code>Ledger</code>.</p>
<h2>Keyboard shortcut</h2>
<p>It's possible to trigger the export to PDF from the keyboard by going
to&nbsp;<em>Keyboard shortcuts</em>&nbsp;in&nbsp;<a class="reference-link"
href="#root/_help_4TIF1oA4VQRO">Options</a>&nbsp;and assigning a key combination
for the <code>exportAsPdf</code> action.</p>
</div>
</div>
</body>
</html>
<p>
<img src="Export as PDF_image.png">
</p>
<p>Screenshot of the note contextual menu indicating the “Export as PDF”
option.</p>
<p>On the desktop application of Trilium it is possible to export a note
as PDF. On the server or PWA (mobile), the option is not available due
to technical constraints and it will be hidden.</p>
<p>To print a note, select the
<img src="1_Export as PDF_image.png">button to the right of the note and select <em>Export as PDF</em>.</p>
<p>Afterwards you will be prompted to select where to save the PDF file.</p>
<h2>Automatic opening of the file</h2>
<p>When the PDF is exported, it is automatically opened with the system default
application for easy preview.</p>
<p>Note that if you are using Linux with the GNOME desktop environment, sometimes
the default application might seem incorrect (such as opening in GIMP).
This is because it uses Gnome's “Recommended applications” list.</p>
<p>To solve this, you can change the recommended application for PDFs via
this command line. First, list the available applications via <code>gio mime application/pdf</code> and
then set the desired one. For example to use GNOME's Evince:</p><pre><code class="language-text-x-trilium-auto">gio mime application/pdf</code></pre>
<h2>Reporting issues with the rendering</h2>
<p>Should you encounter any visual issues in the resulting PDF file (e.g.
a table does not fit properly, there is cut off text, etc.) feel free to
<a
href="#root/_help_wy8So3yZZlH9">report the issue</a>. In this case, it's best to offer a sample note (click
on the
<img src="1_Export as PDF_image.png">button, select Export note → This note and all of its descendants → HTML
in ZIP archive). Make sure not to accidentally leak any personal information.</p>
<h2>Landscape mode</h2>
<p>When exporting to PDF, there are no customizable settings such as page
orientation, size, etc. However, it is possible to specify a given note
to be printed as a PDF in landscape mode by adding the <code>#printLandscape</code> attribute
to it (see&nbsp;<a class="reference-link" href="#root/_help_zEY4DaJG4YT5">Attributes</a>).</p>
<h2>Page size</h2>
<p>By default, the resulting PDF will be in Letter format. It is possible
to adjust it to another page size via the <code>#printPageSize</code> attribute,
with one of the following values: <code>A0</code>, <code>A1</code>, <code>A2</code>, <code>A3</code>, <code>A4</code>, <code>A5</code>, <code>A6</code>, <code>Legal</code>, <code>Letter</code>, <code>Tabloid</code>, <code>Ledger</code>.</p>
<h2>Keyboard shortcut</h2>
<p>It's possible to trigger the export to PDF from the keyboard by going
to&nbsp;<em>Keyboard shortcuts</em>&nbsp;in&nbsp;<a class="reference-link"
href="#root/_help_4TIF1oA4VQRO">Options</a>&nbsp;and assigning a key combination
for the <code>exportAsPdf</code> action.</p>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

After

Width:  |  Height:  |  Size: 87 KiB

View File

@@ -1,32 +1,12 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../style.css">
<base target="_parent">
<title data-trilium-title>Note Icons</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Note Icons</h1>
<div class="ck-content">
<p>Icons are useful for distinguishing notes. At the technical level, they
are set by the <code>iconClass</code> attribute which adds a CSS class to
the note. For example <code>#iconClass="bx bx-calendar"</code> will show
a calendar instead of the default page or folder icon. Looking up and remembering
the css class names is not necessary. While editing a note, click on the
icon next to the title to bring up a chooser gallery:</p>
<p>
<img src="Note Icons_note-icon-chang.png" alt="change note icon">
</p>
<p>
<img src="Note Icons_note-icon-galle.png" alt="note icon gallery">
</p>
</div>
</div>
</body>
</html>
<p>Icons are useful for distinguishing notes. At the technical level, they
are set by the <code>iconClass</code> attribute which adds a CSS class to
the note. For example <code>#iconClass="bx bx-calendar"</code> will show
a calendar instead of the default page or folder icon. Looking up and remembering
the css class names is not necessary. While editing a note, click on the
icon next to the title to bring up a chooser gallery:</p>
<p>
<img src="Note Icons_note-icon-chang.png" alt="change note icon">
</p>
<p>
<img src="Note Icons_note-icon-galle.png" alt="note icon gallery">
</p>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

@@ -1,77 +1,57 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../style.css">
<base target="_parent">
<title data-trilium-title>Note List</title>
</head>
<body>
<div class="content">
<h1 data-trilium-h1>Note List</h1>
<div class="ck-content">
<p>When a note has one or more child notes, they will be listed at the end
of the note for easy navigation.</p>
<h2>Configuration</h2>
<ul>
<li>To hide the note list for a particular note, simply apply the <code>hideChildrenOverview</code>
<a
href="#root/_help_zEY4DaJG4YT5">label</a>.</li>
<li>For some view types, such as Grid view, only a subset of notes will be
displayed and pagination can be used to navigate through all of them for
performance reasons. To adjust the number of notes per page, set <code>pageSize</code> to
the desired number.</li>
</ul>
<h2>View types</h2>
<p>By default, the notes will be displayed in a grid, however there are also
some other view types available.</p>
<aside class="admonition tip">
<p>Generally the view type can only be changed in a&nbsp;<a class="reference-link"
href="#root/_help_GTwFsgaA0lCt">Book</a>&nbsp;note from the&nbsp;<a class="reference-link"
href="#root/_help_BlN9DFI679QC">Ribbon</a>, but it can also be changed
manually on any type of note using the <code>#viewType</code> attribute.</p>
</aside>
<h3>Grid view</h3>
<figure class="image image-style-align-center">
<img style="aspect-ratio:1025/655;" src="1_Note List_image.png" width="1025"
height="655">
</figure>
<p>This view presents the child notes in a grid format, allowing for a more
visual navigation experience.</p>
<ul>
<li>For&nbsp;<a class="reference-link" href="#root/_help_iPIMuisry3hd">Text</a>&nbsp;notes,
the text can be slighly scrollable via the mouse wheel to reveal more context.</li>
<li>For&nbsp;<a class="reference-link" href="#root/_help_6f9hih2hXXZk">Code</a>&nbsp;notes,
syntax highlighting is applied.</li>
<li>For&nbsp;<a class="reference-link" href="#root/_help_W8vYD3Q1zjCR">File</a>&nbsp;notes,
a preview is made available for audio, video and PDF notes.</li>
<li>If the note does not have a content, a list of its child notes will be
displayed instead.</li>
</ul>
<p>This is the default view type.</p>
<h3>List view</h3>
<figure class="image image-style-align-center">
<img style="aspect-ratio:1013/526;" src="Note List_image.png" width="1013"
height="526">
</figure>
<p>In the list view mode, each note is displayed in a single row with only
the title and the icon of the note being visible by the default. By pressing
the expand button it's possible to view the content of the note, as well
as the children of the note (recursively).</p>
<h3>Calendar view</h3>
<figure class="image image-style-align-center">
<img style="aspect-ratio:1090/598;" src="2_Note List_image.png" width="1090"
height="598">
</figure>
<p>In the calendar view, child notes are represented as events, with a start
date and optionally an end date. The view also has interaction support
such as moving or creating new events. See&nbsp;<a class="reference-link"
href="#root/_help_xWbu3jpNWapp">Calendar View</a>&nbsp;for more information.</p>
</div>
</div>
</body>
</html>
<p>When a note has one or more child notes, they will be listed at the end
of the note for easy navigation.</p>
<h2>Configuration</h2>
<ul>
<li>To hide the note list for a particular note, simply apply the <code>hideChildrenOverview</code>
<a
href="#root/_help_zEY4DaJG4YT5">label</a>.</li>
<li>For some view types, such as Grid view, only a subset of notes will be
displayed and pagination can be used to navigate through all of them for
performance reasons. To adjust the number of notes per page, set <code>pageSize</code> to
the desired number.</li>
</ul>
<h2>View types</h2>
<p>By default, the notes will be displayed in a grid, however there are also
some other view types available.</p>
<aside class="admonition tip">
<p>Generally the view type can only be changed in a&nbsp;<a class="reference-link"
href="#root/_help_GTwFsgaA0lCt">Book</a>&nbsp;note from the&nbsp;<a class="reference-link"
href="#root/_help_BlN9DFI679QC">Ribbon</a>, but it can also be changed
manually on any type of note using the <code>#viewType</code> attribute.</p>
</aside>
<h3>Grid view</h3>
<figure class="image image-style-align-center">
<img style="aspect-ratio:1025/655;" src="1_Note List_image.png" width="1025"
height="655">
</figure>
<p>This view presents the child notes in a grid format, allowing for a more
visual navigation experience.</p>
<ul>
<li>For&nbsp;<a class="reference-link" href="#root/_help_iPIMuisry3hd">Text</a>&nbsp;notes,
the text can be slighly scrollable via the mouse wheel to reveal more context.</li>
<li>For&nbsp;<a class="reference-link" href="#root/_help_6f9hih2hXXZk">Code</a>&nbsp;notes,
syntax highlighting is applied.</li>
<li>For&nbsp;<a class="reference-link" href="#root/_help_W8vYD3Q1zjCR">File</a>&nbsp;notes,
a preview is made available for audio, video and PDF notes.</li>
<li>If the note does not have a content, a list of its child notes will be
displayed instead.</li>
</ul>
<p>This is the default view type.</p>
<h3>List view</h3>
<figure class="image image-style-align-center">
<img style="aspect-ratio:1013/526;" src="Note List_image.png" width="1013"
height="526">
</figure>
<p>In the list view mode, each note is displayed in a single row with only
the title and the icon of the note being visible by the default. By pressing
the expand button it's possible to view the content of the note, as well
as the children of the note (recursively).</p>
<h3>Calendar view</h3>
<figure class="image image-style-align-center">
<img style="aspect-ratio:1090/598;" src="2_Note List_image.png" width="1090"
height="598">
</figure>
<p>In the calendar view, child notes are represented as events, with a start
date and optionally an end date. The view also has interaction support
such as moving or creating new events. See&nbsp;<a class="reference-link"
href="#root/_help_xWbu3jpNWapp">Calendar View</a>&nbsp;for more information.</p>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Some files were not shown because too many files have changed in this diff Show More