chore(monorepo): put back docs
|
After Width: | Height: | Size: 150 B |
|
After Width: | Height: | Size: 70 KiB |
|
After Width: | Height: | Size: 27 KiB |
@@ -0,0 +1,10 @@
|
||||
# Archived Notes
|
||||
Archived notes are notes which have `archived` [attribute](../../Advanced%20Usage/Attributes.md) - either directly or [inherited](../../Advanced%20Usage/Attributes/Attribute%20Inheritance.md).
|
||||
|
||||
Such notes are then by default not shown in the autocomplete and in the full text [search](../Navigation/Search.md).
|
||||
|
||||
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.
|
||||
|
||||
You can control whether archived notes are displayed in the note tree with a setting:
|
||||
|
||||

|
||||
|
After Width: | Height: | Size: 18 KiB |
@@ -0,0 +1,21 @@
|
||||
# Attachments
|
||||
A [note](../Notes.md) in Trilium can _own_ one or more attachments, which can be either images or files. These attachments can be displayed or linked within the note that owns them.
|
||||
|
||||
This can be especially useful to include dependencies for your [scripts](../../Scripting.md). The <a class="reference-link" href="../../Advanced%20Usage/Advanced%20Showcases/Weight%20Tracker.md">Weight Tracker</a> shows how to use [chartjs](https://chartjs.org/) which is attached to the script note.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
## Converting notes to attachments
|
||||
|
||||
<a class="reference-link" href="../../Note%20Types/File.md">File</a> notes can be easily converted to attachments of the parent note.
|
||||
|
||||
To do so:
|
||||
|
||||
* For a single note, press the context menu from the <a class="reference-link" href="../UI%20Elements/Note%20buttons.md">Note buttons</a> and select _Convert into attachment_.
|
||||
* For multiple notes, select the given notes in the <a class="reference-link" href="../UI%20Elements/Note%20Tree.md">Note Tree</a>, right click → Advanced → Convert to attachment.
|
||||
|
||||
## Attachment previews
|
||||
|
||||
Attachments share the same content preview for images, videos, PDFs, etc. as the <a class="reference-link" href="../../Note%20Types/File.md">File</a> note type.
|
||||
@@ -0,0 +1,62 @@
|
||||
# Cloning Notes
|
||||
## Motivation
|
||||
|
||||
Trilium's core feature is the ability to structure your notes into hierarchical tree-like structure.
|
||||
|
||||
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.
|
||||
|
||||
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:
|
||||
|
||||
* Technology
|
||||
* Programming
|
||||
* Kotlin
|
||||
* JavaScript
|
||||
* Operating systems
|
||||
* Linux
|
||||
* Windows
|
||||
|
||||
Now, I'm starting to learn about [Bash](https://en.wikipedia.org/wiki/Bash_\(Unix_shell\)) 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.
|
||||
|
||||
## Solution
|
||||
|
||||
The solution to the problem shown above is to allow notes to have multiple parents.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
Here's the final structure with cloning:
|
||||
|
||||
* Technology
|
||||
* Programming
|
||||
* Kotlin
|
||||
* JavaScript
|
||||
* Bash
|
||||
* some sub-notes ...
|
||||
* Operating systems
|
||||
* Linux
|
||||
* Bash
|
||||
* some sub-notes ...
|
||||
* Windows
|
||||
|
||||
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.
|
||||
|
||||
### Demo
|
||||
|
||||

|
||||
|
||||
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> [keyboard shortcuts](../Keyboard%20Shortcuts.md).
|
||||
|
||||
As seen in the demo, you can view the list of all available clones in the "Note Paths" tab in the Ribbon toolbar.
|
||||
|
||||
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.
|
||||
|
||||
## Deleting notes/clones
|
||||
|
||||
With clones, it might not be immediately obvious how deleting works.
|
||||
|
||||
If you try to delete a note, it works like this:
|
||||
|
||||
1. if the note has multiple clones, delete just this clone and leave the actual note (and its other clones) as it is.
|
||||
2. if this note doesn't have any other clones, delete the note
|
||||
* Run the whole process starting with 1. on all note's children notes
|
||||
@@ -0,0 +1,6 @@
|
||||
# Branch prefix
|
||||
Since a single note can appear into multiple places in the <a class="reference-link" href="../../UI%20Elements/Note%20Tree.md">Note Tree</a> via a process called <a class="reference-link" href="../Cloning%20Notes.md">Cloning Notes</a>, it's recommended to choose a generalized name that fits into all locations instead of something more specific to avoid confusion.
|
||||
|
||||
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.
|
||||
|
||||
The prefix is location-specific, so it's displayed only in the note tree.
|
||||
|
After Width: | Height: | Size: 367 KiB |
@@ -0,0 +1,38 @@
|
||||
# Export as PDF
|
||||

|
||||
|
||||
Screenshot of the note contextual menu indicating the “Export as PDF” option.
|
||||
|
||||
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.
|
||||
|
||||
To print a note, select the  button to the right of the note and select _Export as PDF_.
|
||||
|
||||
Afterwards you will be prompted to select where to save the PDF file.
|
||||
|
||||
## Automatic opening of the file
|
||||
|
||||
When the PDF is exported, it is automatically opened with the system default application for easy preview.
|
||||
|
||||
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.
|
||||
|
||||
To solve this, you can change the recommended application for PDFs via this command line. First, list the available applications via `gio mime application/pdf` and then set the desired one. For example to use GNOME's Evince:
|
||||
|
||||
```
|
||||
gio mime application/pdf
|
||||
```
|
||||
|
||||
## Reporting issues with the rendering
|
||||
|
||||
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 [report the issue](../../Troubleshooting/Reporting%20issues.md). In this case, it's best to offer a sample note (click on the  button, select Export note → This note and all of its descendants → HTML in ZIP archive). Make sure not to accidentally leak any personal information.
|
||||
|
||||
## Landscape mode
|
||||
|
||||
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 `#printLandscape` attribute to it (see <a class="reference-link" href="../../Advanced%20Usage/Attributes.md">Attributes</a>).
|
||||
|
||||
## Page size
|
||||
|
||||
By default, the resulting PDF will be in Letter format. It is possible to adjust it to another page size via the `#printPageSize` attribute, with one of the following values: `A0`, `A1`, `A2`, `A3`, `A4`, `A5`, `A6`, `Legal`, `Letter`, `Tabloid`, `Ledger`.
|
||||
|
||||
## Keyboard shortcut
|
||||
|
||||
It's possible to trigger the export to PDF from the keyboard by going to _Keyboard shortcuts_ in <a class="reference-link" href="../UI%20Elements/Options.md">Options</a> and assigning a key combination for the `exportAsPdf` action.
|
||||
|
After Width: | Height: | Size: 87 KiB |
@@ -0,0 +1,6 @@
|
||||
# Note Icons
|
||||
Icons are useful for distinguishing notes. At the technical level, they are set by the `iconClass` attribute which adds a CSS class to the note. For example `#iconClass="bx bx-calendar"` 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:
|
||||
|
||||

|
||||
|
||||

|
||||
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 28 KiB |
@@ -0,0 +1,39 @@
|
||||
# Note List
|
||||
When a note has one or more child notes, they will be listed at the end of the note for easy navigation.
|
||||
|
||||
## Configuration
|
||||
|
||||
* To hide the note list for a particular note, simply apply the `hideChildrenOverview` [label](../../Advanced%20Usage/Attributes.md).
|
||||
* 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 `pageSize` to the desired number.
|
||||
|
||||
## View types
|
||||
|
||||
By default, the notes will be displayed in a grid, however there are also some other view types available.
|
||||
|
||||
> [!TIP]
|
||||
> Generally the view type can only be changed in a <a class="reference-link" href="../../Note%20Types/Book.md">Book</a> note from the <a class="reference-link" href="../UI%20Elements/Ribbon.md">Ribbon</a>, but it can also be changed manually on any type of note using the `#viewType` attribute.
|
||||
|
||||
### Grid view
|
||||
|
||||
<figure class="image image-style-align-center"><img style="aspect-ratio:1025/655;" src="1_Note List_image.png" width="1025" height="655"></figure>
|
||||
|
||||
This view presents the child notes in a grid format, allowing for a more visual navigation experience.
|
||||
|
||||
* For <a class="reference-link" href="../../Note%20Types/Text.md">Text</a> notes, the text can be slighly scrollable via the mouse wheel to reveal more context.
|
||||
* For <a class="reference-link" href="../../Note%20Types/Code.md">Code</a> notes, syntax highlighting is applied.
|
||||
* For <a class="reference-link" href="../../Note%20Types/File.md">File</a> notes, a preview is made available for audio, video and PDF notes.
|
||||
* If the note does not have a content, a list of its child notes will be displayed instead.
|
||||
|
||||
This is the default view type.
|
||||
|
||||
### List view
|
||||
|
||||
<figure class="image image-style-align-center"><img style="aspect-ratio:1013/526;" src="Note List_image.png" width="1013" height="526"></figure>
|
||||
|
||||
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).
|
||||
|
||||
### Calendar view
|
||||
|
||||
<figure class="image image-style-align-center"><img style="aspect-ratio:1090/598;" src="2_Note List_image.png" width="1090" height="598"></figure>
|
||||
|
||||
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 <a class="reference-link" href="Note%20List/Calendar%20View.md">Calendar View</a> for more information.
|
||||
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 909 B |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 7.6 KiB |
|
After Width: | Height: | Size: 1014 B |
|
After Width: | Height: | Size: 966 B |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
@@ -0,0 +1,102 @@
|
||||
# Calendar View
|
||||
<figure class="image image-style-align-center"><img style="aspect-ratio:767/606;" src="4_Calendar View_image.png" width="767" height="606"></figure>
|
||||
|
||||
The Calendar view of Book notes will display each child note in a calendar that has a start date and optionally an end date, as an event.
|
||||
|
||||
The Calendar view has multiple display modes:
|
||||
|
||||
* Week view, where all the 7 days of the week (or 5 if the weekends are hidden) are displayed in columns. This mode allows entering and displaying time-specific events, not just all-day events.
|
||||
* Month view, where the entire month is displayed and all-day events can be inserted. Both time-specific events and all-day events are listed.
|
||||
* Year view, which displays the entire year for quick reference.
|
||||
* List view, which displays all the events of a given month in sequence.
|
||||
|
||||
Unlike other Book view types, the Calendar view also allows some kind of interaction, such as moving events around as well as creating new ones.
|
||||
|
||||
## Creating a calendar
|
||||
|
||||
<figure class="table"><table><thead><tr><th> </th><th> </th><th> </th></tr></thead><tbody><tr><td>1</td><td><img src="2_Calendar View_image.png"></td><td>The Calendar View works only for Book note types. To create a new note, right click on the note tree on the left and select Insert note after, or Insert child note and then select <em>Book</em>.</td></tr><tr><td>2</td><td><img src="3_Calendar View_image.png"></td><td>Once created, the “View type” of the Book needs changed to “Calendar”, by selecting the “Book Properties” tab in the ribbon.</td></tr></tbody></table></figure>
|
||||
|
||||
## Creating a new event/note
|
||||
|
||||
* Clicking on a day will create a new child note and assign it to that particular day.
|
||||
* You will be asked for the name of the new note. If the popup is dismissed by pressing the close button or escape, then the note will not be created.
|
||||
* It's possible to drag across multiple days to set both the start and end date of a particular note.
|
||||

|
||||
* Creating new notes from the calendar will respect the `~child:template` relation if set on the book note.
|
||||
|
||||
## Interacting with events
|
||||
|
||||
* Hovering the mouse over an event will display information about the note.
|
||||

|
||||
* Left clicking the event will go to that note. Middle clicking will open the note in a new tab and right click will offer more options including opening the note in a new split or window.
|
||||
* Drag and drop an event on the calendar to move it to another day.
|
||||
* The length of an event can be changed by placing the mouse to the right edge of the event and dragging the mouse around.
|
||||
|
||||
## Configuring the calendar
|
||||
|
||||
The following attributes can be added to the book type:
|
||||
|
||||
<figure class="table"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>#calendar:hideWeekends</code></td><td>When present (regardless of value), it will hide Saturday and Sundays from the calendar.</td></tr><tr><td><code>#calendar:weekNumbers</code></td><td>When present (regardless of value), it will show the number of the week on the calendar.</td></tr><tr><td><code>#calendar:view</code></td><td><p>Which view to display in the calendar:</p><ul><li><code>timeGridWeek</code> for the <em>week</em> view;</li><li><code>dayGridMonth</code> for the <em>month</em> view;</li><li><code>multiMonthYear</code> for the <em>year</em> view;</li><li><code>listMonth</code> for the <em>list</em> view.</li></ul><p>Any other value will be dismissed and the default view (month) will be used instead.</p><p>The value of this label is automatically updated when changing the view using the UI buttons.</p></td></tr><tr><td><code>~child:template</code></td><td>Defines the template for newly created notes in the calendar (via dragging or clicking).</td></tr></tbody></table></figure>
|
||||
|
||||
In addition, the first day of the week can be either Sunday or Monday and can be adjusted from the application settings.
|
||||
|
||||
## Configuring the calendar events
|
||||
|
||||
For each note of the calendar, the following attributes can be used:
|
||||
|
||||
<figure class="table"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>#startDate</code></td><td>The date the event starts, which will display it in the calendar. The format is <code>YYYY-MM-DD</code> (year, month and day separated by a minus sign).</td></tr><tr><td><code>#endDate</code></td><td>Similar to <code>startDate</code>, mentions the end date if the event spans across multiple days. The date is inclusive, so the end day is also considered. The attribute can be missing for single-day events.</td></tr><tr><td><code>#startTime</code></td><td>The time the event starts at. If this value is missing, then the event is considered a full-day event. The format is <code>HH:MM</code> (hours in 24-hour format and minutes).</td></tr><tr><td><code>#endTime</code></td><td>Similar to <code>startTime</code>, it mentions the time at which the event ends (in relation with <code>endDate</code> if present, or <code>startDate</code>).</td></tr><tr><td><code>#color</code></td><td>Displays the event with a specified color (named such as <code>red</code>, <code>gray</code> or hex such as <code>#FF0000</code>). This will also change the color of the note in other places such as the note tree.</td></tr><tr><td><code>#calendar:color</code></td><td>Similar to <code>#color</code>, but applies the color only for the event in the calendar and not for other places such as the note tree.</td></tr><tr><td><code>#iconClass</code></td><td>If present, the icon of the note will be displayed to the left of the event title.</td></tr><tr><td><code>#calendar:title</code></td><td>Changes the title of an event to point to an attribute of the note other than the title, can either a label or a relation (without the <code>#</code> or <code>~</code> symbol). See <em>Use-cases</em> for more information.</td></tr><tr><td><code>#calendar:displayedAttributes</code></td><td>Allows displaying the value of one or more attributes in the calendar like this: <br><br><img src="9_Calendar View_image.png"> <br><br><code>#weight="70" #Mood="Good" #calendar:displayedAttributes="weight,Mood"</code> <br><br>It can also be used with relations, case in which it will display the title of the target note: <br><br><code>~assignee=@My assignee #calendar:displayedAttributes="assignee"</code></td></tr><tr><td><code>#calendar:startDate</code></td><td>Allows using a different label to represent the start date, other than <code>startDate</code> (e.g. <code>expiryDate</code>). The label name <strong>must not be</strong> prefixed with <code>#</code>. If the label is not defined for a note, the default will be used instead.</td></tr><tr><td><code>#calendar:endDate</code></td><td>Similar to <code>#calendar:startDate</code>, allows changing the attribute which is being used to read the end date.</td></tr><tr><td><code>#calendar:startTime</code></td><td>Similar to <code>#calendar:startDate</code>, allows changing the attribute which is being used to read the start time.</td></tr><tr><td><code>#calendar:endTime</code></td><td>Similar to <code>#calendar:startDate</code>, allows changing the attribute which is being used to read the end time.</td></tr></tbody></table></figure>
|
||||
|
||||
## How the calendar works
|
||||
|
||||

|
||||
|
||||
The calendar displays all the child notes of the book that have a `#startDate`. An `#endDate` can optionally be added.
|
||||
|
||||
If editing the start date and end date from the note itself is desirable, the following attributes can be added to the book note:
|
||||
|
||||
```
|
||||
#viewType=calendar #label:startDate(inheritable)="promoted,alias=Start Date,single,date"
|
||||
#label:endDate(inheritable)="promoted,alias=End Date,single,date"
|
||||
#hidePromotedAttributes
|
||||
```
|
||||
|
||||
This will result in:
|
||||
|
||||

|
||||
|
||||
When not used in a Journal, the calendar is recursive. That is, it will look for events not just in its child notes but also in the children of these child notes.
|
||||
|
||||
## Use-cases
|
||||
|
||||
### Using with the Journal / calendar
|
||||
|
||||
It is possible to integrate the calendar view into the Journal with day notes. In order to do so change the note type of the Journal note (calendar root) to Book and then select the Calendar View.
|
||||
|
||||
Based on the `#calendarRoot` (or `#workspaceCalendarRoot`) attribute, the calendar will know that it's in a calendar and apply the following:
|
||||
|
||||
* The calendar events are now rendered based on their `dateNote` attribute rather than `startDate`.
|
||||
* Interactive editing such as dragging over an empty era or resizing an event is no longer possible.
|
||||
* Clicking on the empty space on a date will automatically open that day's note or create it if it does not exist.
|
||||
* Direct children of a day note will be displayed on the calendar despite not having a `dateNote` attribute. Children of the child notes will not be displayed.
|
||||
|
||||
<img src="8_Calendar View_image.png" width="1217" height="724">
|
||||
|
||||
### Using a different attribute as event title
|
||||
|
||||
By default, events are displayed on the calendar by their note title. However, it is possible to configure a different attribute to be displayed instead.
|
||||
|
||||
To do so, assign `#calendar:title` to the child note (not the calendar/book note), with the value being `name` where `name` can be any label (make not to add the `#` prefix). The attribute can also come through inheritance such as a template attribute. If the note does not have the requested label, the title of the note will be used instead.
|
||||
|
||||
<figure class="table" style="width:100%;"><table><thead><tr><th> </th><th> </th></tr></thead><tbody><tr><td><pre><code class="language-text-x-trilium-auto">#startDate=2025-02-11 #endDate=2025-02-13 #name="My vacation" #calendar:title="name"</code></pre></td><td><p> </p><figure class="image image-style-align-center"><img style="aspect-ratio:445/124;" src="5_Calendar View_image.png" width="445" height="124"></figure></td></tr></tbody></table></figure>
|
||||
|
||||
### Using a relation attribute as event title
|
||||
|
||||
Similarly to using an attribute, use `#calendar:title` and set it to `name` where `name` is the name of the relation to use.
|
||||
|
||||
Moreover, if there are more relations of the same name, they will be displayed as multiple events coming from the same note.
|
||||
|
||||
<figure class="table" style="width:100%;"><table><thead><tr><th> </th><th> </th></tr></thead><tbody><tr><td><pre><code class="language-text-x-trilium-auto">#startDate=2025-02-14 #endDate=2025-02-15 ~for=@John Smith ~for=@Jane Doe #calendar:title="for"</code></pre></td><td><img src="6_Calendar View_image.png" width="294" height="151"></td></tr></tbody></table></figure>
|
||||
|
||||
Note that it's even possible to have a `#calendar:title` on the target note (e.g. “John Smith”) which will try to render an attribute of it. Note that it's not possible to use a relation here as well for safety reasons (an accidental recursion of attributes could cause the application to loop infinitely).
|
||||
|
||||
<figure class="table" style="width:100%;"><table><thead><tr><th> </th><th> </th></tr></thead><tbody><tr><td><pre><code class="language-text-x-trilium-auto">#calendar:title="shortName" #shortName="John S."</code></pre></td><td><figure class="image image-style-align-center"><img style="aspect-ratio:296/150;" src="1_Calendar View_image.png" width="296" height="150"></figure></td></tr></tbody></table></figure>
|
||||
|
After Width: | Height: | Size: 968 B |
|
After Width: | Height: | Size: 12 KiB |
@@ -0,0 +1,20 @@
|
||||
# Note Revisions
|
||||
Trilium supports seamless versioning of notes by storing snapshots ("revisions") of notes at regular intervals.
|
||||
|
||||
## Note Revisions Snapshot Interval
|
||||
|
||||
Time interval of taking note snapshot is configurable in the Options -> Other dialog. This provides a tradeoff between more revisions and more data to store.
|
||||
|
||||
To turn off note versioning for a particular note (or subtree), add `disableVersioning` [label](../../Advanced%20Usage/Attributes.md)to the note.
|
||||
|
||||
## Note Revision Snapshots Limit
|
||||
|
||||
The limit on the number of note snapshots can be configured in the Options -> Other dialog. The note revision snapshot number limit refers to the maximum number of revisions that can be saved for each note. Where -1 means no limit, 0 means delete all revisions. You can set the maximum revisions for a single note through the `versioningLimit=X` label.
|
||||
|
||||
The note limit will not take effect immediately; it will only apply when the note is modified.
|
||||
|
||||
You can click the **Erase excess revision snapshots now** button to apply the changes immediately.
|
||||
|
||||
Note revisions can be accessed through the button on the right of ribbon toolbar.
|
||||
|
||||

|
||||
|
After Width: | Height: | Size: 140 KiB |
@@ -0,0 +1,48 @@
|
||||
# Protected Notes
|
||||
Trilium is designed to store a wide variety of data, including sensitive information such as personal journals, credentials, or confidential documents. To safeguard this type of content, Trilium offers the option to protect notes, which involves the following measures:
|
||||
|
||||
* **Encryption:** Protected notes are encrypted using a key derived from your password. This ensures that without the correct password, protected notes remain indecipherable. Even if someone gains access to your Trilium [database](../../Advanced%20Usage/Database.md), they won't be able to read your encrypted notes.
|
||||
* **Time-limited access:** To access protected notes, you must first enter your password, which decrypts the note for reading and writing. However, after a specified period of inactivity (10 minutes by default), the note is unloaded from memory, requiring you to re-enter your password to access it again.
|
||||
* The session timeout is extended automatically while you're interacting with the protected note, so if you're actively editing, the session remains open. However, if you switch to an unprotected note, the session timer starts, and the session expires after 10 minutes of inactivity unless you return to the protected notes.
|
||||
* **Protection scope:** Protected notes ensure the confidentiality of their content and partially their integrity. While unauthorized users cannot read or edit protected notes, they can still delete or move them outside of the protected session.
|
||||
|
||||
## Using Protected Notes
|
||||
|
||||
By default, notes are unprotected. To protect a note, simply click on the shield icon next to the note's title, as shown here:
|
||||
|
||||

|
||||
|
||||
## What is Encrypted?
|
||||
|
||||
Trilium encrypts the data within protected notes but not their metadata. Specifically:
|
||||
|
||||
**Encrypted:**
|
||||
|
||||
* Note title
|
||||
* Note content
|
||||
* Images
|
||||
* File attachments
|
||||
|
||||
**Not encrypted:**
|
||||
|
||||
* Note structure (i.e., it remains visible that there are protected notes)
|
||||
* Metadata, such as the last modified date
|
||||
* [Attributes](../../Advanced%20Usage/Attributes.md)
|
||||
|
||||
## Encryption Details
|
||||
|
||||
The following steps outline how encryption and decryption work in Trilium:
|
||||
|
||||
1. The user enters a password.
|
||||
2. The password is passed through the [scrypt](https://en.wikipedia.org/wiki/Scrypt) algorithm along with a "password verification" [salt](https://en.wikipedia.org/wiki/Salt_\(cryptography\)) to confirm that the password is correct.
|
||||
3. The password is then processed again through scrypt with an "encryption" salt, which generates a hash.
|
||||
* Scrypt is used for [key stretching](https://en.wikipedia.org/wiki/Key_stretching) to make the password harder to guess.
|
||||
4. The generated hash is used to decrypt the actual _data encryption key_.
|
||||
* The data encryption key is encrypted using [AES-128](https://en.wikipedia.org/wiki/Advanced_Encryption_Standard) with a random [IV](https://en.wikipedia.org/wiki/Initialization_vector).
|
||||
* The data encryption key is randomly generated during the [database](../../Advanced%20Usage/Database.md) initialization and remains constant throughout the document’s lifetime. When the password is changed, only this key is re-encrypted.
|
||||
5. The data encryption key is then used to decrypt the actual content of the note, including its title and body.
|
||||
* The encryption algorithm used is AES-128 with [CBC mode](https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation), where a unique IV is generated for each encryption operation and stored with the cipher text.
|
||||
|
||||
## Sharing Protected Notes
|
||||
|
||||
Protected notes cannot be shared in the same way as regular notes. Their encryption ensures that only authorized users with the correct password can access them.
|
||||
|
After Width: | Height: | Size: 716 KiB |
@@ -0,0 +1,42 @@
|
||||
# Read-Only Notes
|
||||
Some note types such as <a class="reference-link" href="../../Note%20Types/Text.md">Text</a> and <a class="reference-link" href="../../Note%20Types/Code.md">Code</a> notes in Trilium can be set to read-only. When a note is in read-only mode, it is presented to the user in a non-editable view, with the option to switch to editing mode if needed.
|
||||
|
||||
## Automatic read-only mode
|
||||
|
||||
For optimization purposes, Trilium will automatically set very large notes to read-only. Displaying such lengthy notes in editing mode can slow down performance, especially when editing is unnecessary.
|
||||
|
||||
This behavior can be disabled on a per-note basis, by following the instructions of the next section.
|
||||
|
||||
In addition, it's possible to change the number of characters at which the automatic read-only mode will trigger in <a class="reference-link" href="../UI%20Elements/Options.md">Options</a> by going to the options for <a class="reference-link" href="#root/_hidden/_options/_optionsTextNotes">Text Notes</a> and <a class="reference-link" href="#root/_hidden/_options/_optionsCodeNotes">Code Notes</a>.
|
||||
|
||||
## Changing a note's read-only behavior
|
||||
|
||||
Via the <a class="reference-link" href="../UI%20Elements/Ribbon.md">Ribbon</a>, by going to the _Basic Properties_ tab and looking for the _Editable_ selection. The following options are possible:
|
||||
|
||||
* **Auto**
|
||||
This is the default behavior in which the note will be editable by default, unless it becomes large enough to trigger read-only mode.
|
||||
* **Read-only**
|
||||
The note will be always marked as read-only, regardless of its size. Nevertheless, it's still possible to temporarily edit the note if needed. This is generally useful for notes that are not prone to change.
|
||||
* **Always Editable**
|
||||
This option will bypass the automatic read-only activation for this particular note. It's useful for large notes that are frequently edited.
|
||||
|
||||
If the _Editable_ section is missing from the ribbon, then the note type does not support read-only mode.
|
||||
|
||||
### Manually setting the options
|
||||
|
||||
Apart from using the ribbon as previously mentioned, it's also possible to use [labels](../../Advanced%20Usage/Attributes.md) to change the behavior:
|
||||
|
||||
* To set as read-only, apply the `readOnly` label to the note.
|
||||
* To disable automatic read-only (always editable), apply the `autoReadOnlyDisabled` label.
|
||||
|
||||
## Temporarily editing a read-only note
|
||||
|
||||
When accessing a read-only note, it's possible to temporarily edit it by using the  button in the <a class="reference-link" href="../UI%20Elements/Floating%20buttons.md">Floating buttons</a> area.
|
||||
|
||||
When pressed, the note will become editable but will become read-only again after navigating to a different note.
|
||||
|
||||
## Special read-only behavior
|
||||
|
||||
Some note types have a special behavior based on whether the read-only mode is enabled:
|
||||
|
||||
* <a class="reference-link" href="../../Note%20Types/Mermaid%20Diagrams.md">Mermaid Diagrams</a> will hide the Mermaid source code and display the diagram preview in full-size. In this case, the read-only mode can be easily toggled on or off via a dedicated button in the <a class="reference-link" href="../UI%20Elements/Floating%20buttons.md">Floating buttons</a> area.
|
||||
|
After Width: | Height: | Size: 210 B |
@@ -0,0 +1,31 @@
|
||||
# Sorting Notes
|
||||
## Manual sorting
|
||||
|
||||
You can sort notes by right-clicking the parent note in the <a class="reference-link" href="../UI%20Elements/Note%20Tree.md">Note Tree</a> and selecting Advanced -> Sort notes by ... This will sort existing notes, but will not automatically sort future notes added to this parent note.
|
||||
|
||||
The sorting dialog allows:
|
||||
|
||||
* Sorting by title, creation or modification date.
|
||||
* Changing sorting direction can also be adjusted (ascending or descending).
|
||||
* Ensuring folders are displayed at the top.
|
||||
* Natural sort, based on the sorting rules of a particular language.
|
||||
|
||||
## Automatic/Permanent Sorting
|
||||
|
||||
Child notes can be automatically sorted by attaching specific [labels](../../Advanced%20Usage/Attributes.md) to the parent note:
|
||||
|
||||
* `#sorted`: Enables sorting. Can optionally include the name of the note's property/label for sorting criteria (details below).
|
||||
* `#sortDirection`: By default, sorting is ascending. Set this to `desc` to sort in descending order.
|
||||
* `#sortFoldersFirst`: Notes with children will be sorted to the top.
|
||||
|
||||
Sorting is done by comparing note properties or specific labels on child notes. There are four sorting levels, with the first having the highest priority. Lower priority levels are applied only if higher priority comparisons result in equality.
|
||||
|
||||
1. **Top Label Sorting**: Child notes with the `#top` label will appear at the top of the folder.
|
||||
2. **Bottom Label Sorting**: (Introduced in Trilium 0.62) Child notes with the `#bottom` label will appear at the bottom of the folder.
|
||||
3. **Property/Label-Based Sorting**: Sorting is based on the parent note's `#sorted` label:
|
||||
* **Default Sorting**: If `#sorted` has no value, notes are sorted alphabetically.
|
||||
* **Property Sorting**: If `#sorted` is set to `title`, `dateModified`, or `dateCreated`, notes are sorted based on the specified property.
|
||||
* **Label Sorting**: If `#sorted` has any other value, this value is treated as the name of a child note's label, and sorting is based on the values of this label. For example, setting `#sorted=myOrder` on the parent note and using `#myOrder=001`, `#myOrder=002`, etc., on child notes.
|
||||
4. **Alphabetical Sorting**: Used as a last resort when other criteria result in equality.
|
||||
|
||||
All comparisons are made string-wise (e.g., "1" < "2" or "2020-10-10" < "2021-01-15", but also "2" > "10").
|
||||