Compare commits

...

69 Commits

Author SHA1 Message Date
Elian Doran
64869f80ee chore(release): 0.92.7 2025-04-10 21:06:20 +03:00
Elian Doran
3df666b03e Merge pull request #1668 from TriliumNext/fix_redirectBareDomainError_on_initial_start
fix(auth): avoid "Error: Option 'redirectBareDomain' doesn't exist" on new installations
2025-04-10 20:52:54 +03:00
Panagiotis Papadopoulos
1979affa8a refactor(auth): simplify hasRedirectBareDomain
following change suggestion requested here
https://github.com/TriliumNext/Notes/pull/1668#pullrequestreview-2755816018
2025-04-10 19:49:00 +02:00
Panagiotis Papadopoulos
a819166ae5 fix(auth): avoid "Error: Option 'redirectBareDomain' doesn't exist" on new installations
fixes #1667
2025-04-10 19:49:00 +02:00
Elian Doran
9ab48839a7 chore(github): add paypal to funding 2025-04-10 20:29:36 +03:00
Elian Doran
569aeedae4 Update FUNDING.yml 2025-04-10 20:11:50 +03:00
Elian Doran
bfafd993ed chore(readme): add sponsor badge 2025-04-10 20:02:43 +03:00
Elian Doran
279b6fcf14 fix(mobile): bring back bar positioning on iOS 2025-04-10 18:21:36 +03:00
Elian Doran
83fb6f44c2 feat(mobile): hide global menu & tabs when keyboard is opened 2025-04-10 17:45:52 +03:00
Elian Doran
7a1e775de2 feat(mobile): detect presence of the virtual keyboard 2025-04-10 17:41:31 +03:00
Elian Doran
1aa69ba268 fix(mobile): remove vertical scrollbar for editing toolbar 2025-04-10 16:58:30 +03:00
Elian Doran
830285c866 fix(mobile): remove scrollbar for editing toolbar 2025-04-10 16:20:37 +03:00
Elian Doran
4f09f1a266 feat(mobile): flatten editing toolbar 2025-04-10 15:06:33 +03:00
Elian Doran
326c409e47 feat(mobile): reposition dropdowns to point up instead of down 2025-04-10 14:44:27 +03:00
Elian Doran
e23b2f3ddd fix(mobile): bring back scrolling to toolbar 2025-04-10 14:07:44 +03:00
Elian Doran
0f2bc529bf feat(mobile): improve editing toolbar positioning on Android 2025-04-10 12:10:56 +03:00
Elian Doran
fbba76bbb3 refactor(components): split editor toolbar for mobile 2025-04-10 11:50:28 +03:00
Elian Doran
c422c3e5b9 fix(mobile): detection when authentication is disabled (closes #1660) 2025-04-10 10:35:24 +03:00
Elian Doran
ce4b5b8193 fix(desktop): missing </body> 2025-04-10 09:45:05 +03:00
Elian Doran
2e48837c89 feat(docs): document basic search functionality 2025-04-09 17:06:45 +03:00
Elian Doran
feb43193b1 feat(docs): document search in note functionality 2025-04-09 16:47:07 +03:00
Elian Doran
475c3bdde8 chore(docs): add rewritten links for navigation (closes #1643) 2025-04-09 15:57:19 +03:00
Elian Doran
a88a92d490 feat(edit-docs): rewrite links to allow navigation in help 2025-04-09 15:48:03 +03:00
Elian Doran
652fc48a86 chore(docs): sync 2025-04-09 15:13:10 +03:00
Elian Doran
f7fbda1b00 fix(docs): import errors due to file case errors 2025-04-09 14:46:21 +03:00
Elian Doran
27ad451bd8 feat(electron): support transparency on Linux if background effects are enabled 2025-04-09 14:10:11 +03:00
Elian Doran
c603efb44b Merge pull request #1655 from TriliumNext/type_sql-transactional
types: use type variable for sql.transactional's return value
2025-04-09 12:07:57 +03:00
JYC333
34d401574c Merge pull request #1650 from TriliumNext/eslint
Use eslint simple-import-sort plugin to enable auto fix
2025-04-09 16:49:27 +08:00
Panagiotis Papadopoulos
6d74f6c1c4 chore(deps): run npm audit fix
fixes
vite  6.2.0 - 6.2.4
Severity: moderate
Vite allows server.fs.deny to be bypassed with .svg or relative paths - https://github.com/advisories/GHSA-xcj6-pq6g-qj4x
2025-04-09 09:52:01 +02:00
Panagiotis Papadopoulos
c494cca229 Merge branch 'develop' into type_sql-transactional 2025-04-09 09:44:47 +02:00
Panagiotis Papadopoulos
da649d75c0 refactor(routes/api/recovery_codes): use Array.from with mapFn in generateRecoveryCodes
gives us the identical result as before, but a lot more concise and "DRY"
2025-04-09 09:43:38 +02:00
Panagiotis Papadopoulos
68ea84a2cb refactor(routes/api/recovery_codes): use .map instead of .forEach
it doesn't make sense to use a forEach here, when all we do is push values into an array => just use .map directly as it returns an array
2025-04-09 09:24:28 +02:00
Panagiotis Papadopoulos
05917fd815 fix(routes/api/recovery_codes): convert number into string
fixes type error, as usedStatus is expecting string[] and "indexOf" returns a number
2025-04-09 09:21:20 +02:00
Panagiotis Papadopoulos
eae68064e5 types(recovery_codes): use sql.transactional Generics to simplify typings 2025-04-09 08:41:55 +02:00
Panagiotis Papadopoulos
af85ef0b47 types(services/sql): explicitly cast return value as type variable T instead of any
previously the type variable was useless, because
`const ret = (dbConnection.transaction(func) as any).deferred();` was inferred as "any".
2025-04-09 08:34:42 +02:00
Panagiotis Papadopoulos
80dd925231 chore(lint): fix minor lint issues in recovery_codes
/home/pano/Programming/0_repos/TriliumNextNotes/src/services/encryption/recovery_codes.ts
   2:1  error  Imports should be sorted alphabetically                            sort-imports
   3:1  error  Imports should be sorted alphabetically                            sort-imports
  13:9  error  'encryptedRecoveryCodes' is never reassigned. Use 'const' instead  prefer-const
  57:5  error  Unexpected var, use let or const instead                           no-var
2025-04-09 08:19:20 +02:00
Elian Doran
43c2818299 fix(calendar_view): promoted attributes overlap 2025-04-08 23:38:04 +03:00
Elian Doran
05a006faca fix(calendar_view): add back note icon 2025-04-08 23:33:57 +03:00
Elian Doran
b1c8e625b2 fix(calendar_view): display hours in calendar view 2025-04-08 23:28:27 +03:00
Elian Doran
eea141225d refactor(calendar): dedicated method for building event content 2025-04-08 22:48:57 +03:00
Elian Doran
0b0d212854 feat(docs): document recent changes 2025-04-08 21:53:31 +03:00
Elian Doran
5b34e8a327 feat(docs): document advanced options in context menu 2025-04-08 21:44:22 +03:00
Elian Doran
5eb8e478b7 feat(docs): document the note tree contextual menu 2025-04-08 20:06:55 +03:00
Elian Doran
584fa67074 fix(bulk_actions): clarify actions taken by "Update relation target" 2025-04-08 19:38:19 +03:00
Elian Doran
2b56c2acbe feat(docs): document bulk actions 2025-04-08 19:35:13 +03:00
Elian Doran
8949f68b81 fix(server): duplicating note subtree escapes special characters 2025-04-08 18:09:02 +03:00
Jin
08ae71e70f chore: 🤖 use simple-import-sort plugin
Use simple-import-sort plugin to enable auto-fix import sort
2025-04-08 14:09:37 +02:00
Elian Doran
0eec8042ca fix(new_tab): workspace switcher no longer displayed
Regression of 7f1eb99127
2025-04-08 12:46:58 +03:00
Elian Doran
3a1f1ceedb fix(export/markdown): double slashes breaking math expressions (closes #1649) 2025-04-08 12:06:46 +03:00
Elian Doran
d03ee26408 fix(editor): random crashes due to lacking null safety in syntax highlight 2025-04-08 09:06:27 +03:00
Elian Doran
8b7f16d49b fix(editor): syntax highlighting not working in nested elements (closes #1609, closes #843) 2025-04-07 23:51:56 +03:00
Elian Doran
7f1eb99127 fix(client): build error and simplify doRefresh in type widgets 2025-04-07 22:50:38 +03:00
Elian Doran
c74f51472e fix(options): "Override theme fonts" not reflecting immediately 2025-04-07 22:34:47 +03:00
Elian Doran
d33162785e fix(client): right-shift on non-standard themes (closes #1646) 2025-04-07 17:55:35 +03:00
Elian Doran
63458d55d3 fix(client): quick search popup not working in horizontal layout (closes #1647) 2025-04-07 17:36:29 +03:00
Elian Doran
6cc10a47d1 feat(docs): document the hidden tree 2025-04-07 13:29:22 +03:00
Elian Doran
5130089b34 feat(docs): clarify attribute prefixes 2025-04-07 12:35:52 +03:00
Elian Doran
ec5025d7fd feat(docs): clarify attribute use cases 2025-04-07 12:30:37 +03:00
Elian Doran
190cff6f7e feat(docs): improve description of labels and relations 2025-04-07 12:22:48 +03:00
Elian Doran
72f0bc32df feat(docs): reorganize scripting notes and finalize attribute reference 2025-04-07 11:16:10 +03:00
Elian Doran
cdf9fa5b4a feat(docs): attribute reference (wip) 2025-04-07 09:47:15 +03:00
Elian Doran
b7566ad979 feat(docs): hiding note list 2025-04-06 23:06:21 +03:00
Elian Doran
9fb04b256d feat(docs): document supported syntax 2025-04-06 22:55:24 +03:00
Elian Doran
f58a90c648 feat(docs): sidebar, table of contents, highlights list 2025-04-06 17:13:21 +03:00
Elian Doran
19a540200e chore(docs): sync 2025-04-06 16:19:17 +03:00
Elian Doran
c9e3fb90f1 feat(docs): reorganize & merge attachments 2025-04-06 16:04:55 +03:00
Elian Doran
fb6e6241d9 feat(docs): reorganize script notes & document render note 2025-04-06 15:30:54 +03:00
Elian Doran
161f6172e7 chore(docs): sync 2025-04-06 15:00:24 +03:00
Elian Doran
2e3d692419 chore(deps): update package-lock 2025-04-06 14:58:36 +03:00
428 changed files with 10209 additions and 7601 deletions

4
.github/FUNDING.yml vendored
View File

@@ -1,4 +1,4 @@
# These are supported funding model platforms
github: [zadam]
custom: ["https://paypal.me/za4am"]
github: [eliandoran]
custom: ["https://paypal.me/eliandoran"]

View File

@@ -1,6 +1,6 @@
# TriliumNext Notes
![Docker Pulls](https://img.shields.io/docker/pulls/triliumnext/notes) ![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/triliumnext/notes/total)
![GitHub Sponsors](https://img.shields.io/github/sponsors/eliandoran) ![Docker Pulls](https://img.shields.io/docker/pulls/triliumnext/notes) ![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/triliumnext/notes/total)
[English](./README.md) | [Chinese](./README-ZH_CN.md) | [Russian](./README.ru.md) | [Japanese](./README.ja.md) | [Italian](./README.it.md) | [Spanish](./README.es.md)

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
# Advanced Showcases
Trilium offers advanced functionality through [Scripts](../Note%20Types/Code/Scripting.md) and [Promoted Attributes](Attributes/Promoted%20Attributes.md). To illustrate these features, we've prepared several showcases available in the [demo notes](Database.md):
Trilium offers advanced functionality through [Scripts](../Scripting.md) and [Promoted Attributes](Attributes/Promoted%20Attributes.md). To illustrate these features, we've prepared several showcases available in the [demo notes](Database.md):
* [Relation Map](../Note%20Types/Relation%20Map.md)
* [Day Notes](Advanced%20Showcases/Day%20Notes.md)

View File

@@ -19,7 +19,7 @@ You can also notice how this day note has [promoted attribute](../Attributes/Pro
## Templates
Trilium provides [template](../Attributes/Template.md) functionality, and it could be used together with day notes.
Trilium provides [template](../Templates.md) functionality, and it could be used together with day notes.
You can define one of the following relations on the root of the journal (identified by `#calendarRoot` label):

View File

@@ -1,9 +1,9 @@
# Task Manager
Task Manager is a [promoted attributes](../Attributes/Promoted%20Attributes.md) and [scripts](../../Note%20Types/Code/Scripting.md)showcase present in the [demo notes](../Database.md).
Task Manager is a [promoted attributes](../Attributes/Promoted%20Attributes.md) and [scripts](../../Scripting.md)showcase present in the [demo notes](../Database.md).
## Demo
![](../../Attachments/task-manager.png)
![](Task%20Manager_task-manager.png)
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.
@@ -15,7 +15,7 @@ New tasks are created in the TODO note which has `~child:template` [relation](..
### Attributes
Task template defines several [promoted attributes](../Attributes/Promoted%20Attributes.md) - todoDate, doneDate, tags, location. Importantly it also defines `~runOnAttributeChange` relation - [event](../../Note%20Types/Code/Events.md) handler which is run on attribute change. This [script](../../Note%20Types/Code/Scripting.md) 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.
Task template defines several [promoted attributes](../Attributes/Promoted%20Attributes.md) - todoDate, doneDate, tags, location. Importantly it also defines `~runOnAttributeChange` relation - [event](../../Scripting/Events.md) handler which is run on attribute change. This [script](../../Scripting.md) 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.
### New task button

View File

@@ -1,13 +1,13 @@
# Weight Tracker
![](Weight%20Tracker_image.png)
The `Weight Tracker` is a [Script API](../../Note%20Types/Code/Script%20API.md) showcase present in the [demo notes](../Database.md).
The `Weight Tracker` is a [Script API](../../Scripting/Script%20API.md) showcase present in the [demo notes](../Database.md).
By adding `weight` as a [promoted attribute](../Attributes/Promoted%20Attributes.md) in the [template](../Attributes/Template.md) from which [day notes](Day%20Notes.md) are created, you can aggregate the data and plot weight change over time.
By adding `weight` as a [promoted attribute](../Attributes/Promoted%20Attributes.md) in the [template](../Templates.md) from which [day notes](Day%20Notes.md) are created, you can aggregate the data and plot weight change over time.
## Implementation
The `Weight Tracker` note in the screenshot above is of the type `Render Note`. That type of note doesn't have any useful content itself. Instead it is a placeholder where a [script](../../Note%20Types/Code/Scripting.md) can render its output.
The `Weight Tracker` note in the screenshot above is of the type `Render Note`. That type of note doesn't have any useful content itself. Instead it is a placeholder where a [script](../../Scripting.md) can render its output.
Scripts for `Render Notes` are defined in a [relation](../Attributes.md) called `~renderNote`. In this example, it's the `Weight Tracker`'s child `Implementation`. The Implementation consists of two [code notes](../../Note%20Types/Code.md) that contain some HTML and JavaScript respectively, which load all the notes with a `weight` attribute and display their values in a chart.

View File

@@ -1,77 +1,28 @@
# Attributes
<figure class="image"><img style="aspect-ratio:1071/146;" src="Attributes_image.png" width="1071" height="146"></figure>
In Trilium, attributes are key-value pairs assigned to notes, providing additional metadata or functionality. There are two primary types of attributes:
1. **Labels**: Simple key-value text records
2. **Relations**: Named links to other notes
1. <a class="reference-link" href="Attributes/Labels.md">Labels</a> 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.
For more information, including predefined labels, see <a class="reference-link" href="Attributes/Labels.md">Labels</a>.
2. <a class="reference-link" href="Attributes/Relations.md">Relations</a> define connections between notes, similar to links. These can be used for metadata and scripting purposes.
For more information, including a list of predefined relations, see <a class="reference-link" href="Attributes/Relations.md">Relations</a>.
These attributes play a crucial role in organizing, categorising, and enhancing the functionality of notes.
![](Attributes_image.png)
## Viewing the list of attributes
## Labels
Both the labels and relations for the current note are displayed in the _Owned Attributes_ section of the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Ribbon.md">Ribbon</a>, where they can be viewed and edited. Inherited attributes are displayed in the _Inherited Attributes_ section of the ribbon, where they can only be viewed.
Labels in Trilium can be used for a variety of purposes:
* **Metadata**: Assign labels with optional values for categorization, such as `#year=1999`, `#genre="sci-fi"`, or `#author="Neal Stephenson"`
* **Configuration**: Labels can configure advanced features or settings
* **Scripts and Plugins**: Used to tag notes with special metadata, such as the "weight" attribute in the <a class="reference-link" href="Advanced%20Showcases/Weight%20Tracker.md">Weight Tracker</a>.
Labels are also searchable, enhancing note retrieval.
### Common Labels for Advanced Configuration
* `disableVersioning`: Disables automatic versioning, ideal for large, unimportant notes like script libraries
* `versioningLimit`: Used to limit the number of revisions for a single note
* `calendarRoot`: Marks the note as the root for [day notes](Advanced%20Showcases/Day%20Notes.md). Only one note should carry this label
* `archived`: Hides notes from default search results and dialogs
* `excludeFromExport`: Excludes notes and their subtrees from export operations
* `run`: Specifies events to trigger scripts (e.g., `frontendStartup`, `hourly`)
* `runAtHour`: Defines specific hours for scripts to run, used with `#run=hourly`
* `disableInclusion`: Prevents a script from being included in parent script executions
* `sorted`: Automatically sorts child notes alphabetically by title
* `top`: Keeps the note at the top of its parent's list, useful with `sorted`
* `hidePromotedAttributes`: Hides certain attributes in the note's display
* `readOnly`: Sets the note to read-only mode, applicable to text and code notes
* `autoReadOnlyDisabled`: Disables automatic read-only mode for large notes
* `appCss`: Marks CSS notes used to modify Triliums appearance
* `appTheme`: Marks full CSS themes available in Trilium's options
* `cssClass`: Adds a CSS class to the note's representation in the tree
* `iconClass`: Adds a CSS class to the note's icon, useful for distinguishing notes visually. See <a class="reference-link" href="../Basic%20Concepts%20and%20Features/Notes/Note%20Icons.md">Note Icons</a>.
* `pageSize`: Specifies the number of items per page in note listings
* `customRequestHandler` **and** `customResourceProvider`: Refer to <a class="reference-link" href="Custom%20Request%20Handler.md">Custom Request Handler</a>
* `widget`: Marks a note as a custom widget, added to Trilium's component tree
* `workspace` **and related attributes**: See <a class="reference-link" href="../Basic%20Concepts%20and%20Features/Navigation/Workspace.md">Workspace</a> for more details
* `searchHome`: Specifies the parent for new search notes
* `inbox`: Designates a default location for new notes created via the sidebar
* `sqlConsoleHome`: Default location for SQL console notes
* `bookmarked` **and** `bookmarkFolder`: See <a class="reference-link" href="../Basic%20Concepts%20and%20Features/Navigation/Bookmarks.md">Bookmarks</a>
* `share:[…]`: See <a class="reference-link" href="Sharing.md">Sharing</a>
* `keyboardShortcut`: Assigns a keyboard shortcut to open the note
* `displayRelations` **and** `hideRelations`: Manages the display of note relations
* `titleTemplate`: See <a class="reference-link" href="Default%20Note%20Title.md">Default Note Title</a>
* `template`: Makes the note available as a template
* `toc`: Controls the visibility of the table of contents
* `color`: Defines the color of the note in the tree and links
* `hideChildrenOverview`: Hides child notes in the parent note's editor
* `viewType`: Sets the view of child notes (grid or list)
## Relations
Relations define connections between notes, similar to links.
### Uses
* **Metadata Relationships**: For example, linking a book note to an author note
* **Scripting**: Attaching scripts to events or conditions related to the note
### Common Relations
* **Event-based Relations**: Such as `runOnNoteCreation` or `runOnNoteChange`, which trigger scripts on specific actions
* **Other Relations**: Include `template`, `renderNote`, `widget`, and sharing-related relations
In the list of attributes, labels are prefixed with the `#` character whereas relations are prefixed with the `~` character.
## Multiplicity
Attributes in Trilium can be "multivalued", meaning multiple attributes with the same name can coexist.
Attributes in Trilium can be "multi-valued", meaning multiple attributes with the same name can co-exist.
## Attribute Definitions and Promoted Attributes

View File

@@ -1,25 +1,38 @@
# Attribute Inheritance
## 1\. Standard Inheritance
Inheritance refers to the process of having a [label](Labels.md) or a [relation](Relations.md) shared across multiple notes, generally in parent-child relations (or anywhere if using templates).
## Standard Inheritance
In Trilium, attributes can be automatically inherited by child notes if they have the `isInheritable` flag set to `true`. This means the attribute (a key-value pair) is applied to the note and all its descendants.
### Example Use Case
To make an attribute inheritable, simply use the visual editor for <a class="reference-link" href="Labels.md">Labels</a> or <a class="reference-link" href="Relations.md">Relations</a>. Alternatively, the attribute can be manually defined where `#myLabel=value` becomes `#myLabel(inheritable)=value` when inheritable.
The `archived` 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.
As an example, the `archived` 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.
## 2\. Copying Inheritance
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 _copying inheritance_ or _template inheritance_ needs to be used instead.
## Copying Inheritance
Copying inheritance differs from standard inheritance by using a `child:` 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.
### How to Use
If a parent note has the label `#child:exampleAttribute`, all newly created child notes (one level deep) will inherit the `#exampleAttribute` label. This can be useful for setting default properties for notes in a specific section.
* **Syntax:** `#child:attributeName`
* **Chained Inheritance:** You can chain this inheritance, such as `#child:child:attributeName`, where each child down the hierarchy receives the appropriate attribute.
Similarly, for relations use `~child:myRelation`.
### Example
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.
If a parent note has the label `#child:exampleAttribute`, all newly created child notes will inherit the `#exampleAttribute` label. This can be useful for setting default properties for notes in a specific section.
### Chained inheritance
## 3\. Template Inheritance
It is possible to define labels across multiple levels of depth. For example, `#child:child:child:foo` applied to a root note would create:
Attributes can also be inherited from [templates](Template.md). 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.
* `#child:child:foo` on the first-level children.
* `#child:foo` on the second-level children.
* `#foo` on the third-level children.
Similarly, use `~child:child:child:foo` if dealing with relations.
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.
## Template Inheritance
Attributes can also be inherited from <a class="reference-link" href="../Templates.md">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.

File diff suppressed because one or more lines are too long

View File

@@ -1,7 +1,7 @@
# Promoted Attributes
Promoted attributes are [attributes](../Attributes.md) which are considered important and thus are "promoted" onto the main note UI. See example below:
![](../../Attachments/promoted-attributes.png)
![](Promoted%20Attributes_promot.png)
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.

View File

@@ -0,0 +1,44 @@
# Relations
A relation is similar to a [label](Labels.md), but instead of having a text value it refers to another note.
## Common use cases
* **Metadata Relationships for personal use**: For example, linking a book note to an author note.
This can be combined with <a class="reference-link" href="Promoted%20Attributes.md">Promoted Attributes</a> to make their display more user-friendly.
* **Configuration**: For configuring some notes such as <a class="reference-link" href="../../Note%20Types/Render%20Note.md">Render Note</a>, or configuring <a class="reference-link" href="../Sharing.md">Sharing</a> or <a class="reference-link" href="../Templates.md">Templates</a> (see the list below).
* **Scripting**: Attaching scripts to events or conditions related to the note.
## Creating a relation using the visual editor
1. Go to the _Owned Attributes_ section in the <a class="reference-link" href="../../Basic%20Concepts%20and%20Features/UI%20Elements/Ribbon.md">Ribbon</a>.
2. Press the + button (_Add new attribute_) to the right.
3. Select _Add new relation_ for the relation.
> [!TIP]
> If you prefer keyboard shortcuts, press <kbd>Alt</kbd>+<kbd>L</kbd> while focused on a note or in the _Owned Attributes_ section to display the visual editor.
While in the visual editor:
* Set the desired name
* Set the Target note (the note to point to). Unlike labels, relations cannot exist with a target note.
* Check _Inheritable_ if the label should be inherited by the child notes as well. See <a class="reference-link" href="Attribute%20Inheritance.md">Attribute Inheritance</a> for more information.
## Creating a relation manually
In the _Owned Attributes_ section in the <a class="reference-link" href="../../Basic%20Concepts%20and%20Features/UI%20Elements/Ribbon.md">Ribbon</a>:
* To create a relation called `myRelation`:
* First type `~myRelation=@`.
* After this, an autocompletion box should appear.
* Type the title of the note to point to and press <kbd>Enter</kbd> to confirm (or click the desired note).
* Alternatively copy a note from the <a class="reference-link" href="../../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree.md">Note Tree</a> and paste it after the `=` sign (without the `@`, in this case).
* To create an inheritable relation, follow the same steps as previously described but instead of `~myRelation` write `~myRelation(inheritable)`.
## Predefined relations
These relations are supported and used internally by Trilium.
> [!TIP]
> Some relations presented here end with a `*`. 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.
<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="../../Scripting/Events.md">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="../Templates.md">Templates</a>&nbsp;for a similar concept. See&nbsp;<a class="reference-link" href="Attribute%20Inheritance.md">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="../../Note%20Types/Render%20Note.md">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: 36 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

@@ -0,0 +1,87 @@
# Bulk Actions
<figure class="image"><img style="aspect-ratio:1425/654;" src="Bulk Actions_image.png" width="1425" height="654"></figure>
The _Bulk Actions_ 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.
## Interaction
* The first step is to select the notes in the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree.md">Note Tree</a>. It's possible to apply bulk actions to:
* A single note (and potentially its child notes) simply by clicking on it (with a left click or a right click).
* Multiple notes. See <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree/Multiple%20selection.md">Multiple selection</a> on how to do so.
* Right click in the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree.md">Note Tree</a> and select _Advanced__Apply bulk actions_.
* By default, only the selected notes will be affected. To also include all the descendants of the notes, check _Include descendants of the selected notes_. The number of affected notes at the top of the dialog will update to reflect the change.
* Click on which action to apply from the _Available actions_ section. A detailed description of each is available in the next section.
* For each action selected, the _Chosen actions_ section will update to reveal the entry. Each action will have its own configuration.
* To remove an action, simply press the X button to the right of it.
* It is possible to apply multiple actions of the same type, such as adding multiple types.
* When all the actions are defined, press _Execute bulk actions_ to trigger all of them at once.
* For convenience, the last bulk action configuration is saved for further use and will be restored when entering the dialog again.
## Actions
### Labels
These actions operate the <a class="reference-link" href="Attributes/Labels.md">Labels</a> of a note:
* **Add label**
* For each note, if it doesn't already have a [label](Attributes/Labels.md) of the given name, it will create it. Keep the _New value_ field empty to create a label without a value, or complete it to assign a value.
* If a note already has this label, its value will be updated.
* **Update label value**
* For each note, if it has a [label](Attributes/Labels.md) of the given name, it will change its value to the specified one. Leave _New value_ field empty to create a label without a value.
* Notes without the label will not be affected.
* _**Rename label**_
* For each note, if it has a [label](Attributes/Labels.md) 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.
* Notes without the label will not be affected.
* **Delete label**
* 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).
* Notes without the label will not be affected.
### Relations
These actions operate the <a class="reference-link" href="Attributes/Relations.md">Relations</a> of a note:
* **Add relation**
* For each note, it will create a relation pointing to the given note.
* Notes without this relation will not be affected.
* **Update relation target**
* For each note, it will modify a relation to point to the newly given note.
* Notes without this relation will not be affected.
* **Rename relation**
* 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.
* Notes without this relation will not be affected.
* **Delete relation**
* For each note, if it has a relation of the given name, it will be deleted.
* Notes without this relation will not be affected.
### Notes
* **Rename note**
* For each note, it will change the title of the note to the given one.
* 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 <a class="reference-link" href="../Scripting/Script%20API/Frontend%20API/FNote.md">FNote</a>, for example:
* `NEW: ${note.title}` will prefix all notes with `NEW:` .
* `${note.dateCreatedObj.format('MM-DD:')}: ${note.title}` will prefix the note titles with each note's creation date (in month-day format).
* **Move note**
* For each note, it will be moved to the specified parent note.
* As an alternative for less complex situations, the notes can be moved directly from within the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree.md">Note Tree</a> via cut → paste or via the contextual menu.
* **Delete note**
* For each note, it will be deleted.
* As an alternative for less complex situations, the notes can be removed directly from within the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree.md">Note Tree</a> by selecting them and pressing <kbd>Delete</kbd>.
* **Delete note revisions**
* This will delete all the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/Notes/Note%20Revisions.md">Note Revisions</a> of the notes.
### Others
* **Execute script**
* For more complex scenarios, it is possible to type in a JavaScript expression in order to apply the necessary changes.
* Examples:
* To apply a suffix (`- suffix` in this example), to the note title:
```javascript
note.title = note.title + " - suffix";
```
* To alter attributes of a note based on another attribute, such as setting the `#shareAlias` label to the title of the note:
```javascript
note.setLabel("shareAlias", note.title)
```

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

View File

@@ -1,16 +0,0 @@
# Bulk actions
### Execute script
For more complex scenarios, it is possible to type in a JavaScript expression in order to apply the necessary changes.
To apply a suffix (`- suffix` in this example), to the note title:
```javascript
note.title = note.title + " - suffix";
```
To alter attributes of a note in a bulk action, such as setting the `#shareAlias` label to the title of the note:
```javascript
note.setLabel("shareAlias", note.title)
```

View File

@@ -0,0 +1,19 @@
# Trilium instance
A Trilium instance represents a server. If <a class="reference-link" href="../../Installation%20%26%20Setup/Synchronization.md">Synchronization</a> 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.
## Setting the instance name
To set up a name for the instance, modify the `config.ini`:
```
[General]
instanceName=Hello
```
## Distinguishing the instance on back-end
Use `api.getInstanceName()` to obtain the instance name of the current server, as specified in the config file or in environment variables.
## Limiting script runs based on instance
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 `runOnInstance` 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.

View File

@@ -1,5 +1,5 @@
# Custom Request Handler
Trilium provides a mechanism for [scripts](../Note%20Types/Code/Scripting.md) 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. `/trilium buy milk`).
Trilium provides a mechanism for [scripts](../Scripting.md) 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. `/trilium buy milk`).
## Create note from outside Trilium
@@ -53,7 +53,7 @@ Trilium will then find our code note created above and execute it. `api.req`, `a
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.
Once we pass these checks we will just create the desired note using [Script API](../Note%20Types/Code/Script%20API.md).
Once we pass these checks we will just create the desired note using [Script API](../Scripting/Script%20API.md).
## Custom resource provider

View File

@@ -3,24 +3,9 @@ Your Trilium data is stored in a [SQLite](https://www.sqlite.org) database which
## Demo Notes
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:
When first starting Trilium, it will provide a set of notes to showcase various features of the application.
* [Relation Map](../Note%20Types/Relation%20Map.md)
* [Day Notes](Advanced%20Showcases/Day%20Notes.md)
* [Weight Tracker](Advanced%20Showcases/Weight%20Tracker.md)
* [Task Manager](Advanced%20Showcases/Task%20Manager.md)
* [Custom CSS Themes](../Basic%20Concepts%20and%20Features/Themes.md)
### Restoring Demo Notes
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.
You can easily restore the demo notes by using Trilium's built-in import feature by importing them:
* Download [this .zip archive](https://github.com/TriliumNext/Notes/raw/develop/db/demo.zip) with the latest version of the demo notes
* Right click on any note in your tree under which you would like the demo notes to be imported
* Click "Import into note"
* Select the .zip archive to import it
For more information see <a class="reference-link" href="Database/Demo%20Notes.md">Demo Notes</a>.
## Manually Modifying the Database

View File

@@ -0,0 +1,19 @@
# Demo Notes
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:
* <a class="reference-link" href="../../Note%20Types/Relation%20Map.md">Relation Map</a>
* <a class="reference-link" href="../Advanced%20Showcases/Day%20Notes.md">Day Notes</a>
* <a class="reference-link" href="../Advanced%20Showcases/Weight%20Tracker.md">Weight Tracker</a>
* <a class="reference-link" href="../Advanced%20Showcases/Task%20Manager.md">Task Manager</a>
* <a class="reference-link" href="../../Basic%20Concepts%20and%20Features/Themes.md">Themes</a>
### Restoring Demo Notes
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.
You can easily restore the demo notes by using Trilium's built-in import feature by importing them:
* Download [this .zip archive](https://github.com/TriliumNext/Notes/raw/develop/db/demo.zip) with the latest version of the demo notes
* Right click on any note in your tree under which you would like the demo notes to be imported
* Click "Import into note"
* Select the .zip archive to import it

View File

@@ -7,7 +7,7 @@ If you are doing any advanced development or troubleshooting where you manually
The SQL Console is Trilium's built-in database editor.
See [SQL Console](Manually%20altering%20the%20database/SQL%20Console.md).
See <a class="reference-link" href="Manually%20altering%20the%20database/SQL%20Console.md">SQL Console</a>.
## Externally modifying the database

View File

@@ -17,14 +17,16 @@ And all children of "2022 Books" will be created with initial title "\[Author na
The value of `#titleTemplate` 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.
As an example, imagine you collect server outage incidents and write some notes. It looks like this:
Second variable injected is `parentNote` which gives access to the parent [`FNote`](../Scripting/Script%20API/Frontend%20API/FNote.md).
* Incidents
* 2022-05-09: System crash
* 2022-05-15: Backup delay
See also <a class="reference-link" href="Templates.md">Templates</a> which provides similar capabilities, including default note's content.
You can automatize the date assignment by assigning a label `#titleTemplate="${now.format('YYYY-MM-DD')}: "` to the parent note "Incidents". Whenever a new child note is created, the title template is evaluated with the injected [now](https://day.js.org/docs/en/display/format) object.
### Examples
Second variable injected is [parentNote](https://triliumnext.github.io/Notes/backend_api/BNote.html), an example could be `#titleTemplate="${parentNote.getLabelValue('authorName')}'s literary works"`.
See also \[\[[template](Attributes/Template.md)\]\] which provides similar capabilities, including default note's content.
* Imagine you collect server outage incidents and write some notes. It looks like this:
* Incidents
* 2022-05-09: System crash
* 2022-05-15: Backup delay
* You can automatize the date assignment by assigning a label `#titleTemplate="${now.format('YYYY-MM-DD')}: "` to the parent note "Incidents". Whenever a new child note is created, the title template is evaluated with the injected [now](https://day.js.org/docs/en/display/format) object.
* To use a parent's attribute in the title of new notes: `#titleTemplate="${parentNote.getLabelValue('authorName')}'s literary works"`
* To mirror the parent's note title: `${parentNote.title}`

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@@ -3,24 +3,24 @@ Trilium allows you to share selected notes as **publicly accessible** read-only
## Prerequisites
To use the sharing feature, you must have a [server installation](../Installation%20%26%20Setup/Server%20Installation.md) of Trilium. This is necessary because the notes will be hosted from the server.
To use the sharing feature, you must have a <a class="reference-link" href="../Installation%20%26%20Setup/Server%20Installation.md">Server Installation</a> of Trilium. This is necessary because the notes will be hosted from the server.
## How to Share a Note
1. **Enable Sharing**: To share a note, toggle the `Shared` switch within the note's interface. Once sharing is enabled, an URL will appear, which you can click to access the shared note.
![Share Note](../Attachments/share-single-note.png)
![Share Note](Sharing_share-single-note.png)
2. **Access the Shared Note**: 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 `localhost (127.0.0.1)`.
![Shared Note Example](../Attachments/share-single-note-web.png)
![Shared Note Example](Sharing_share-single-note-.png)
## Sharing a Note Subtree
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.
![Shared Subtree Example](../Attachments/share-multiple-notes-web.png)
![Shared Subtree Example](Sharing_share-multiple-not.png)
## Viewing All Shared Notes
@@ -40,7 +40,7 @@ To protect shared notes with a username and password, you can use the `#shareCre
The default shared page is basic in design, but you can customize it using your own CSS:
* **Custom CSS**: Link a CSS [code note](../Note%20Types/Code.md) to the shared page by adding a `~shareCss` 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 `#shareHiddenFromTree` label.
* **Custom CSS**: Link a CSS <a class="reference-link" href="../Note%20Types/Code.md">Code</a> note to the shared page by adding a `~shareCss` 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 `#shareHiddenFromTree` label.
* **Omitting Default CSS**: For extensive styling changes, use the `#shareOmitDefaultCss` label to avoid conflicts with Trilium's [default stylesheet](../Basic%20Concepts%20and%20Features/Themes.md).
### Adding JavaScript
@@ -71,7 +71,7 @@ Shared notes typically have URLs like `http://domain.tld/share/knvU8aJy4dJ7`, wh
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.
![Shared Notes List](../Attachments/shared-list.png)
![Shared Notes List](Sharing_shared-list.png)
### Setting a Custom Favicon
@@ -81,12 +81,6 @@ To customize the favicon for your shared pages, create a relation `~shareFavicon
You can designate a specific note or folder as the root of your shared content by adding the `#shareRoot` label. This note will be linked when visiting `[http://domain.tld/share](http://domain/share)`, making it easier to use Trilium as a fully-fledged website. Consider combining this with the `#shareIndex` label, which will display a list of all shared notes.
## Additional Options
* **Raw Note Sharing**: Use the `#shareRaw` label to share a note without any HTML wrapper.
* **Disallow Robot Indexing**: Add the `#shareDisallowRobotIndexing` label to prevent search engines from indexing the shared page by including a `noindex, follow` meta tag and `X-Robots-Tag: noindex` header.
* **Shared Notes Index**: For text notes with the `#shareIndex` label, the content will display a list of all shared note roots.
## Limitations
While the sharing feature is powerful, it has some limitations:
@@ -98,4 +92,8 @@ While the sharing feature is powerful, it has some limitations:
* **Protected Notes**: Cannot be shared.
* **Include Notes**: Not supported.
Some of these limitations may be addressed in future updates.
Some of these limitations may be addressed in future updates.
## Attribute reference
<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="Sharing/Serving%20directly%20the%20content%20o.md">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

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 116 KiB

View File

Before

Width:  |  Height:  |  Size: 89 KiB

After

Width:  |  Height:  |  Size: 89 KiB

View File

Before

Width:  |  Height:  |  Size: 136 KiB

After

Width:  |  Height:  |  Size: 136 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -1,7 +1,7 @@
# Template
# Templates
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:
1. **Attribute Inheritance**: All attributes from the template note are [inherited](Attribute%20Inheritance.md) by the instance notes. Even attributes with `#isInheritable=false` are inherited by the instance notes, although only inheritable attributes are further inherited by the children of the instance notes.
1. **Attribute Inheritance**: All attributes from the template note are [inherited](Attributes/Attribute%20Inheritance.md) by the instance notes. Even attributes with `#isInheritable=false` are inherited by the instance notes, although only inheritable attributes are further inherited by the children of the instance notes.
2. **Content Duplication**: The content of the template note is copied to the instance note, provided the instance note is empty at the time of template assignment.
3. **Child Note Duplication**: All child notes of the template are deep-duplicated to the instance note.
@@ -9,11 +9,11 @@ A template in Trilium serves as a predefined structure for other notes, referred
A typical example would be a "Book" template note, which might include:
* **Promoted Attributes**: Such as publication year, author, etc. (see [promoted attributes](Promoted%20Attributes.md)).
* **Promoted Attributes**: Such as publication year, author, etc. (see [promoted attributes](Attributes/Promoted%20Attributes.md)).
* **Outline**: An outline for a book review, including sections like themes, conclusion, etc.
* **Child Notes**: Additional notes for highlights, summary, etc.
![Template Example](../../Attachments/template.png)
![Template Example](Templates_template.png)
## Instance Note
@@ -21,9 +21,9 @@ An instance note is a note related to a template note. This relationship means t
To create an instance note through the UI:
![show child note templates](../../Attachments/template-create-instance-n.png)
![show child note templates](Templates_template-create-.png)
For the template to appear in the menu, the template note must have the `#template` label. Do not confuse this with the `~template` relation, which links the instance note to the template note. If you use [workspaces](../../Basic%20Concepts%20and%20Features/Navigation/Workspace.md), you can also mark templates with `#workspaceTemplate` to display them only in the workspace.
For the template to appear in the menu, the template note must have the `#template` label. Do not confuse this with the `~template` relation, which links the instance note to the template note. If you use [workspaces](../Basic%20Concepts%20and%20Features/Navigation/Workspaces.md), you can also mark templates with `#workspaceTemplate` to display them only in the workspace.
Templates can also be added or changed after note creation by creating a `~template` relation pointing to the desired template note.
@@ -31,6 +31,6 @@ Templates can also be added or changed after note creation by creating a `~templ
From a visual perspective, templates can define `#iconClass` and `#cssClass` attributes, allowing all instance notes (e.g., books) to display a specific icon and CSS style.
Explore the concept further in the [demo notes](../Database.md), including examples like the [Relation Map](../../Note%20Types/Relation%20Map.md), [Task Manager](../Advanced%20Showcases/Task%20Manager.md), and [Day Notes](../Advanced%20Showcases/Day%20Notes.md).
Explore the concept further in the [demo notes](Database.md), including examples like the [Relation Map](../Note%20Types/Relation%20Map.md), [Task Manager](Advanced%20Showcases/Task%20Manager.md), and [Day Notes](Advanced%20Showcases/Day%20Notes.md).
Additionally, see [default note title](../Default%20Note%20Title.md) for creating title templates. Note templates and title templates can be combined by creating a `#titleTemplate` for a template note.
Additionally, see [default note title](Default%20Note%20Title.md) for creating title templates. Note templates and title templates can be combined by creating a `#titleTemplate` for a template note.

View File

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 533 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 KiB

View File

@@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="147px" height="32px" viewBox="0 0 147 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.0.4 (8053) - http://www.bohemiancoding.com/sketch -->
<title>button</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="button" sketch:type="MSLayerGroup">
<rect id="Background" fill="#7056BF" sketch:type="MSShapeGroup" x="0" y="0" width="147" height="32" rx="4"></rect>
<g id="Icon" transform="translate(10.000000, 8.000000)" fill="#FFFFFF" sketch:type="MSShapeGroup">
<path d="M14.819,3.216 L9.103,0.25 C8.464,-0.082 7.536,-0.081 6.898,0.25 L1.181,3.216 C0.496,3.571 0,4.365 0,5.102 L0,11.035 C0,11.774 0.497,12.566 1.181,12.921 L4.039,14.404 C4.529,14.656 5.134,14.467 5.388,13.978 C5.642,13.487 5.451,12.884 4.961,12.629 L2.106,11.148 C2.068,11.124 2.008,11.039 2,11.035 L1.996,5.143 C2.008,5.098 2.068,5.013 2.103,4.991 L7.816,2.026 C7.897,1.991 8.106,1.992 8.181,2.025 L13.894,4.989 C13.932,5.013 13.992,5.098 14,5.102 L14.003,10.995 C13.992,11.039 13.932,11.124 13.898,11.146 L11.039,12.629 C10.549,12.884 10.358,13.487 10.612,13.978 C10.79,14.32 11.14,14.517 11.501,14.517 C11.656,14.517 11.814,14.481 11.961,14.404 L14.818,12.921 C15.503,12.566 16,11.774 16,11.035 L16,5.102 C16,4.365 15.504,3.571 14.819,3.216" id="App"></path>
<path d="M11.707,9.707 C12.098,9.316 12.098,8.684 11.707,8.293 L8.708,5.294 C8.616,5.201 8.505,5.128 8.382,5.077 C8.138,4.976 7.862,4.976 7.618,5.077 C7.495,5.128 7.385,5.201 7.292,5.294 L4.293,8.293 C3.902,8.684 3.902,9.316 4.293,9.707 C4.488,9.902 4.744,10 5,10 C5.256,10 5.512,9.902 5.707,9.707 L7,8.414 L7,15 C7,15.553 7.447,16 8,16 C8.553,16 9,15.553 9,15 L9,8.414 L10.293,9.707 C10.488,9.902 10.744,10 11,10 C11.256,10 11.512,9.902 11.707,9.707" id="Arrow"></path>
</g>
<path d="M81.393,21.091 C81.744,21.091 82.173,21.052 82.368,21.013 L82.368,20.09 C82.186,20.142 81.913,20.181 81.666,20.181 C80.834,20.181 80.6,19.817 80.6,19.089 L80.6,15.059 L82.381,15.059 L82.381,14.136 L80.6,14.136 L80.6,11.692 L79.482,11.692 L79.482,14.136 L78.286,14.136 L78.286,15.059 L79.482,15.059 L79.482,19.336 C79.482,20.532 79.95,21.091 81.393,21.091 Z M86.697,21.143 C88.374,21.143 89.882,19.921 89.882,17.568 C89.882,15.202 88.374,13.993 86.697,13.993 C85.007,13.993 83.499,15.202 83.499,17.568 C83.499,19.921 85.02,21.143 86.697,21.143 Z M86.697,20.194 C85.306,20.194 84.63,19.024 84.63,17.568 C84.63,16.021 85.384,14.955 86.697,14.955 C88.062,14.955 88.751,16.138 88.751,17.568 C88.751,19.141 87.997,20.194 86.697,20.194 Z M94.705,21 L95.849,21 L95.849,16.463 L100.802,16.463 L100.802,21 L101.946,21 L101.946,11.38 L100.802,11.38 L100.802,15.41 L95.849,15.41 L95.849,11.38 L94.705,11.38 L94.705,21 Z M106.834,21.143 C108.121,21.143 108.992,20.597 109.629,19.687 L108.979,19.115 C108.459,19.83 107.9,20.233 106.912,20.233 C105.781,20.233 104.884,19.401 104.845,17.854 L109.694,17.854 L109.694,17.62 C109.694,15.137 108.459,13.993 106.834,13.993 C105.391,13.993 103.727,15.072 103.727,17.568 C103.727,19.96 105.209,21.143 106.834,21.143 Z M104.871,16.983 C105.027,15.566 105.898,14.929 106.821,14.929 C107.952,14.929 108.537,15.761 108.628,16.983 L104.871,16.983 Z M111.293,21 L112.411,21 L112.411,16.567 C112.918,15.592 113.737,15.02 114.829,15.02 C114.868,15.02 115.115,15.02 115.154,15.033 L115.232,13.993 L115.089,13.993 C113.75,13.993 112.944,14.617 112.437,15.41 L112.411,15.41 L112.411,14.136 L111.293,14.136 L111.293,21 Z M119.301,21.143 C120.978,21.143 122.486,19.921 122.486,17.568 C122.486,15.202 120.978,13.993 119.301,13.993 C117.611,13.993 116.103,15.202 116.103,17.568 C116.103,19.921 117.624,21.143 119.301,21.143 Z M119.301,20.194 C117.91,20.194 117.234,19.024 117.234,17.568 C117.234,16.021 117.988,14.955 119.301,14.955 C120.666,14.955 121.355,16.138 121.355,17.568 C121.355,19.141 120.601,20.194 119.301,20.194 Z M124.072,21 L125.19,21 L125.19,18.894 L126.555,17.425 L128.583,21 L129.779,21 L127.283,16.593 L129.532,14.136 L128.258,14.136 L125.19,17.568 L125.19,11.38 L124.072,11.38 L124.072,21 Z M133.055,21.13 C134.173,21.13 135.031,20.558 135.629,19.973 L135.629,21 L136.76,21 L136.76,14.136 L135.629,14.136 L135.629,19.089 C134.914,19.765 134.238,20.194 133.406,20.194 C132.535,20.194 132.145,19.765 132.145,18.855 L132.145,14.136 L131.027,14.136 L131.027,19.089 C131.027,20.389 131.742,21.13 133.055,21.13 L133.055,21.13 Z" id="to-Heroku" fill="#B7A7D5" sketch:type="MSShapeGroup"></path>
<path d="M34.183,21 L36.718,21 C39.773,21 41.567,19.427 41.567,16.164 C41.567,12.94 39.812,11.38 36.718,11.38 L34.183,11.38 L34.183,21 Z M35.327,19.973 L35.327,12.433 L36.835,12.433 C39.175,12.433 40.423,13.577 40.423,16.164 C40.423,18.842 39.188,19.973 36.861,19.973 L35.327,19.973 Z M46,21.143 C47.287,21.143 48.158,20.597 48.795,19.687 L48.145,19.115 C47.625,19.83 47.066,20.233 46.078,20.233 C44.947,20.233 44.05,19.401 44.011,17.854 L48.86,17.854 L48.86,17.62 C48.86,15.137 47.625,13.993 46,13.993 C44.557,13.993 42.893,15.072 42.893,17.568 C42.893,19.96 44.375,21.143 46,21.143 Z M44.037,16.983 C44.193,15.566 45.064,14.929 45.987,14.929 C47.118,14.929 47.703,15.761 47.794,16.983 L44.037,16.983 Z M50.459,23.6 L51.577,23.6 L51.577,20.116 C52.162,20.727 52.877,21.104 53.722,21.104 C55.399,21.104 56.634,19.947 56.634,17.555 C56.634,15.163 55.412,13.993 53.839,13.993 C52.812,13.993 52.097,14.513 51.577,15.085 L51.577,14.136 L50.459,14.136 L50.459,23.6 Z M53.566,20.194 C52.838,20.194 52.175,19.83 51.577,19.154 L51.577,16.008 C52.149,15.384 52.786,14.955 53.579,14.955 C54.684,14.955 55.516,15.813 55.516,17.568 C55.516,19.388 54.762,20.194 53.566,20.194 Z M58.324,21 L59.442,21 L59.442,11.38 L58.324,11.38 L58.324,21 Z M64.304,21.143 C65.981,21.143 67.489,19.921 67.489,17.568 C67.489,15.202 65.981,13.993 64.304,13.993 C62.614,13.993 61.106,15.202 61.106,17.568 C61.106,19.921 62.627,21.143 64.304,21.143 Z M64.304,20.194 C62.913,20.194 62.237,19.024 62.237,17.568 C62.237,16.021 62.991,14.955 64.304,14.955 C65.669,14.955 66.358,16.138 66.358,17.568 C66.358,19.141 65.604,20.194 64.304,20.194 Z M69.465,23.639 C70.804,23.639 71.337,22.989 71.805,21.78 L74.743,14.136 L73.612,14.136 L71.597,19.687 L71.571,19.687 L69.556,14.136 L68.373,14.136 L71.025,21.039 L70.765,21.715 C70.492,22.391 70.154,22.69 69.452,22.69 C68.971,22.69 68.633,22.625 68.438,22.573 L68.178,23.47 C68.477,23.561 68.854,23.639 69.465,23.639 L69.465,23.639 Z" id="Deploy" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 211 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

View File

@@ -1,5 +1,5 @@
# Markdown
Trilium Notes supports importing Markdown restricted to the [CommonMark specification](https://spec.commonmark.org/current/) (where [tables are not supported](https://github.com/TriliumNext/Notes/issues/2026))
Trilium supports Markdown for both import and export, while trying to keep compatibility as high as possible.
## Import
@@ -7,7 +7,7 @@ Trilium Notes supports importing Markdown restricted to the [CommonMark specific
If you want to import just a chunk of markdown from clipboard, you can do it from editor block menu:
![](../../Attachments/markdown-inline-import.gif)
![](Markdown_markdown-inline-i.gif)
### File import
@@ -20,7 +20,7 @@ You can also import Markdown files from files:
\[\[gifs/markdown-file-import.gif\]\]
![](../../Attachments/markdown-file-import.gif)
![](Markdown_markdown-file-imp.gif)
## Export
@@ -28,14 +28,23 @@ You can also import Markdown files from files:
You can export whole subtree to ZIP archive which will have directory structured modelled after subtree structure:
![](../../Attachments/markdown-export-subtree.gif)
![](Markdown_markdown-export-s.gif)
### Single note export
If you want to export just single note without its subtree, you can do it from Note actions menu:
![](../../Attachments/markdown-export-note.gif)
![](Markdown_markdown-export-n.gif)
### Exporting protected notes
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.
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.
## Supported syntax
* [GitHub-Flavored Markdown](https://github.github.com/gfm/) is the main syntax that Trilium is following.
* 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.
* 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.
* <a class="reference-link" href="../../Note%20Types/Text/Admonitions.md">Admonitions</a> are supported using GitHub's format.
* 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.
* Math equations are supported using `$` and `$$` syntaxes.

View File

@@ -1,12 +1,12 @@
# Bookmarks
To easily access selected notes, you can bookmark them. See demo:
![](../../Attachments/bookmarks.gif)
![](Bookmarks_bookmarks.gif)
## Bookmark folder
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:
![](../../Attachments/bookmark-folder.png)
![](Bookmarks_bookmark-folder.png)
To do this, you need to add a `#bookmarkFolder` label to the note.

View File

@@ -8,8 +8,18 @@ The _Jump to Note_ function allows easy navigation between notes by searching fo
* In the <a class="reference-link" href="../UI%20Elements/Launch%20Bar.md">Launch Bar</a>, press ![](1_Jump%20to%20Note_image.png) button.
* Using the keyboard, press <kbd>Ctrl</kbd> + <kbd>J</kbd>.
## Recent notes
Jump to note also has the ability to show the list of recently viewed / edited notes and quickly jump to it.
To access this functionality, click on `Jump to` button on the top. By default, (when nothing is entered into autocomplete), this dialog will show the list of recent notes.
Alternatively you can click on the "time" icon on the right.
<img src="Jump to Note_recent-notes.gif" width="812" height="585">
## Interaction
* By default, when there is no text entered it will display the most recent notes (see <a class="reference-link" href="Note%20Navigation.md">Note Navigation</a>).
* By default, when there is no text entered it will display the most recent notes.
* Using the keyboard, use the up or down arrow keys to navigate between items. Press <kbd>Enter</kbd> to open the desired note.
* If the note doesn't exist, it's possible to create it by typing the desired note title and selecting the _Create and link child note_ option.

View File

@@ -1,8 +1,8 @@
# Note Hoisting
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:
![](../../Attachments/note-hoisting.gif)
![](Note%20Hoisting_note-hoistin.gif)
In addition to showing only this subtree, this also narrows both full text search and [“jump to note”](Note%20Navigation.md) to just notes present in hoisted subtree.
See also [Workspace](Workspace.md) which extends this feature.
See also [Workspace](Workspaces.md) which extends this feature.

View File

@@ -11,16 +11,6 @@ This works identically to browser backwards / forwards, it's actually using buil
## Jump to note
This is useful to quickly find and view arbitrary note - click on `Jump to` 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.
This is useful to quickly find and view arbitrary notes - click on `Jump to` 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.
![](../../Attachments/jump-to.gif)
### Recent notes
Jump to note also has the ability to show the list of recently viewed / edited notes and quickly jump to it.
To access this functionality, click on `Jump to` button on the top. By default, (when nothing is entered into autocomplete), this dialog will show the list of recent notes.
Alternatively you can click on the "time" icon on the right.
![](../../Attachments/recent-notes.gif)
See <a class="reference-link" href="Jump%20to%20Note.md">Jump to Note</a> for more information.

View File

@@ -0,0 +1,29 @@
# Search in note
<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>
Local search allows you to search within the currently displayed note. 
## Alternatives
* Pressing Ctrl+F while in a browser while not focused in a <a class="reference-link" href="../../Note%20Types/Text.md">Text</a> or a <a class="reference-link" href="../../Note%20Types/Code.md">Code</a> note will trigger the browser's native search. This will also find text that is part of Trilium's UI.
* Pressing Ctrl+F in a <a class="reference-link" href="../../Note%20Types/Text.md">Text</a> note will reveal <a class="reference-link" href="../../Advanced%20Usage/Technologies%20used/CKEditor.md">CKEditor</a>'s search functionality.
## Accessing the search
* On desktop, press<kbd>Ctrl</kbd> + <kbd>F</kbd>
* From the <a class="reference-link" href="../UI%20Elements/Note%20buttons.md">Note buttons</a>, look for the context menu and select _Search in note_.
## Interaction
* Finding:
* Fill in the _Find in text…_ with the text to search for.
* The search will be executed automatically in the background.
* Use up and down arrows of the text box to navigate between results.
* Replacing:
* Fill in the _Find in text_… field with the text to replace.
* Fill in the _Replace with…_ field the text to replace it with.
* Press _Replace_ to replace only the current result.
* Press _Replace all_ to replace all of them at once.
* Options:
* _Case sensitive_ the search will distinguish upper case characters from lower case (e.g. searching for Hello will not match `hello`).
* _Match words_ - the search will find only exact word matches (e.g. searching for `Java` will not match `JavaScript`).

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -1,13 +1,59 @@
# Search
## Local Search
Local search allows you to search within the currently displayed note. To initiate a local search, press <kbd>Ctrl</kbd> + <kbd>F</kbd>. If using a web browser, this will be handled by the browser's native search functionality. In the desktop (electron) version, a separate dialog will apear.
## Note Search
<figure class="image"><img style="aspect-ratio:987/725;" src="Search_image.png" width="987" height="725"></figure>
Note search enables you to find notes by searching for text in the title, content, or [attributes](../../Advanced%20Usage/Attributes.md) 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.
To search for notes, click on the magnifying glass icon on the toolbar or press the <kbd>Ctrl</kbd> + <kbd>S</kbd> keyboard [shortcut](../Keyboard%20Shortcuts.md).
## Accessing the search
* From the <a class="reference-link" href="../UI%20Elements/Launch%20Bar.md">Launch Bar</a>, look for the dedicated search button.
* To limit the search to a note and its children, select _Search from subtree_ from the <a class="reference-link" href="../UI%20Elements/Note%20Tree/Note%20tree%20contextual%20menu.md">Note tree contextual menu</a> or press <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>S</kbd>.
## Interaction
To search for notes, click on the magnifying glass icon on the toolbar or press the keyboard [shortcut](../Keyboard%20Shortcuts.md).
1. Set the text to search for in the _Search string_ field.
1. Apart from searching for words ad-literam, there is also the possibility to search for attributes or properties of notes.
2. See the examples below for more information.
2. To limit the search to a note and its sub-children, set a note in _Ancestor_.
1. This value is also pre-filled if the search is triggered from a [hoisted note](Note%20Hoisting.md) or a [workspace](Workspaces.md).
2. To search the entire database, keep the value empty.
3. 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 _depth_ field to one of the provided values.
4. In addition to that, the search can be configured via the _Add search options_ buttons, as described in the follow-up section.
5. Press _Search_ to trigger the search. The results are displayed below the search configuration pane.
6. The _Search & Execute actions_ button is only relevant if at least one action has been added (as described in the section below).
7. The _Save to note_ will create a new note with the search configuration. For more information, see <a class="reference-link" href="../../Note%20Types/Saved%20Search.md">Saved Search</a>.
## Search options
Click on which search option to apply from the Add search option section.
* For each search option selected, the search configuration will update to reveal the entry. Each search option will have its own configuration.
* To remove a search option, simply press the X button to the right of it.
The options available are:
1. Search script
1. This feature allows writing a <a class="reference-link" href="../../Note%20Types/Code.md">Code</a> note that will handle the search on its own.
2. Fast search
1. 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).
2. This method can speed up the search considerably for large [databases](../../Advanced%20Usage/Database.md).
3. Include archived
1. <a class="reference-link" href="../Notes/Archived%20Notes.md">Archived Notes</a> will also be included in the results, whereas otherwise they would be ignored.
4. Order by
1. Allows changing the criteria for ordering the results, for example to order by creation date or alphabetically instead of by relevancy (default).
2. It's also possible to change the order (ascending or descending) of the results.
5. Limit
1. Limits the results to a given maximum.
2. This can help if the number of results would otherwise be high, at the cost of not being able to view all the results.
6. Debug
1. This will print additional information in the server log (see <a class="reference-link" href="../../Troubleshooting/Error%20logs.md">Error logs</a>), regarding how the search expression was parsed.
2. 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.
7. Action
1. 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.
2. 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).
3. The actions given are the same as the ones in <a class="reference-link" href="../../Advanced%20Usage/Bulk%20Actions.md">Bulk Actions</a>, which is an alternative for operating directly with notes within the <a class="reference-link" href="../UI%20Elements/Note%20Tree.md">Note Tree</a>.
4. After defining the actions, first press _Search_ to check the matched notes and then press _Search & Execute actions_ to trigger the actions.
### Simple Note Search Examples

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

View File

@@ -1,24 +0,0 @@
# Workspace
Workspace is a concept built up on top of [note hoisting](Note%20Hoisting.md). 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.
So far workspace consists of these features:
* [note hoisting](Note%20Hoisting.md) - you can "zoom" into a workspace subtree to focus only on the relevant notes
* easy entering of workspace: 
![](1_Workspace_image.png)
* visual identification of workspace in tabs:
![](Workspace_image.png)
### How to use workspaces
Let's say you have identified the workspaces and their subtrees. Define on the root of this subtree following labels:
* `#workspace` - Marks this note as a workspace, button to enter the workspace is controlled by this
* `#workspaceIconClass` - controls the box icon to be displayed in the tree and tabs, example `bx bx-home`. See [https://boxicons.com/](https://boxicons.com/)
* `#workspaceTabBackgroundColor` - Background color of the tab, use any CSS color format, e.g. "lightblue" or "#ddd". See [https://www.w3schools.com/cssref/css\_colors.asp](https://www.w3schools.com/cssref/css_colors.asp).
* `#workspaceCalendarRoot` - marking a note with this label will define a new per-workspace calendar. If there's no such note, the global calendar will be used.
* `#workspaceTemplate` - This note will appear in the selection of available templates when creating a new note, but only when you are currently hoisted into a workspace containing this template.

View File

@@ -0,0 +1,18 @@
# Workspaces
Workspace is a concept built up on top of [note hoisting](Note%20Hoisting.md). 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.
So far workspace consists of these features:
* [note hoisting](Note%20Hoisting.md) - you can "zoom" into a workspace subtree to focus only on the relevant notes
* easy entering of workspace: 
![](1_Workspaces_image.png)
* visual identification of workspace in tabs:
![](Workspaces_image.png)
### Configuration
<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="../../Advanced%20Usage/Advanced%20Showcases/Day%20Notes.md">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

@@ -5,7 +5,7 @@ Note is a central entity in Trilium. Main attributes of note are title and conte
The main note type is a rich-text note type called <a class="reference-link" href="../Note%20Types/Text.md">Text</a>. For diagrams and drawing there is <a class="reference-link" href="../Note%20Types/Canvas.md">Canvas</a> and <a class="reference-link" href="../Note%20Types/Mermaid%20Diagrams.md">Mermaid Diagrams</a>.
There are also more complex note types such as <a class="reference-link" href="../Note%20Types/Saved%20Search.md">Saved Search</a>, <a class="reference-link" href="../Note%20Types/Render%20Note.md">Render Note</a> that usually go hand-in-hand with <a class="reference-link" href="../Note%20Types/Code/Scripting.md">Scripting</a>.
There are also more complex note types such as <a class="reference-link" href="../Note%20Types/Saved%20Search.md">Saved Search</a>, <a class="reference-link" href="../Note%20Types/Render%20Note.md">Render Note</a> that usually go hand-in-hand with <a class="reference-link" href="../Scripting.md">Scripting</a>.
In Trilium there's no specific "folder" note type. Any note can have children and thus be a folder.
@@ -23,7 +23,7 @@ Tree structure of notes can resemble file system - but compared to that notes in
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.
Within (by default) 7 days, it is possible to undelete these soft-deleted notes - open Recent Changes 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.
Within (by default) 7 days, it is possible to undelete these soft-deleted notes - open the <a class="reference-link" href="UI%20Elements/Recent%20Changes.md">Recent Changes</a> 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.
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.
@@ -33,4 +33,4 @@ After the 7 days (configurable) the notes will be "erased" - their title, conten
## See also
* [Read-only note](Notes/Read-Only%20Notes.md)
* <a class="reference-link" href="Notes/Read-Only%20Notes.md">Read-Only Notes</a>

View File

@@ -7,4 +7,4 @@ This can be useful for notes which are no longer very useful but still valuable
You can control whether archived notes are displayed in the note tree with a setting:
![](../../Attachments/hide-archived.png)
![](Archived%20Notes_hide-archiv.png)

View File

@@ -1,12 +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](../../Note%20Types/Code/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.
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.

View File

@@ -43,7 +43,7 @@ So now the "Bash" subtree appears on multiple locations in the hierarchy. Both t
### Demo
![](../../Attachments/create-clone.gif)
![](Cloning%20Notes_create-clone.gif)
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).
@@ -51,10 +51,6 @@ As seen in the demo, you can view the list of all available clones in the "Note
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.
## Prefix
Since notes can be categorized into multiple places, 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 tree pane.
## Deleting notes/clones
With clones, it might not be immediately obvious how deleting works.

View File

@@ -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.

View File

@@ -1,6 +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:
![change note icon](../../Attachments/note-icon-change.png)
![change note icon](Note%20Icons_note-icon-chang.png)
![note icon gallery](../../Attachments/note-icon-gallery.png)
![note icon gallery](Note%20Icons_note-icon-galle.png)

View File

@@ -1,6 +1,11 @@
# 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.

View File

@@ -17,4 +17,4 @@ You can click the **Erase excess revision snapshots now** button to apply the ch
Note revisions can be accessed through the button on the right of ribbon toolbar.
![](../../Attachments/note-revisions.png)
![](Note%20Revisions_note-revisi.png)

View File

@@ -10,7 +10,7 @@ Trilium is designed to store a wide variety of data, including sensitive informa
By default, notes are unprotected. To protect a note, simply click on the shield icon next to the note's title, as shown here:
![example animation of unlocking protected notes](../../Attachments/protecting-note.gif)
![example animation of unlocking protected notes](Protected%20Notes_protecting.gif)
## What is Encrypted?

View File

@@ -14,11 +14,9 @@ In addition, it's possible to change the number of characters at which the autom
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.
 
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.
 
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.

View File

@@ -1,7 +1,14 @@
# Sorting Notes
## Sorting Notes
## Manual sorting
You can sort notes by right-clicking the parent note in the note tree and selecting Advanced -> Sort notes by ... This will sort existing notes, but will not automatically sort future notes added to this parent note
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

View File

@@ -3,7 +3,7 @@
Trilium comes with a couple pre-installed color themes, with the default being a light theme. To switch to a dark theme or any other available theme, navigate to the Options menu (accessible via the app icon in the top-left corner), select the Appearance tab, and choose your preferred theme.
![Dark Theme](../Attachments/dark-theme.png)
![Dark Theme](Themes_dark-theme.png)
## Creating Custom CSS Themes
@@ -85,7 +85,7 @@ Custom themes can be exported as `.tar` archives, which can be shared with other
An example user theme, _Steel Blue_, is available in the demo document.
![Steel Blue Theme](../Attachments/steel-blue.png)
![Steel Blue Theme](Themes_steel-blue.png)
### Using Custom CSS for Specific Purposes

View File

Before

Width:  |  Height:  |  Size: 235 KiB

After

Width:  |  Height:  |  Size: 235 KiB

View File

Before

Width:  |  Height:  |  Size: 248 KiB

After

Width:  |  Height:  |  Size: 248 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

View File

@@ -50,13 +50,13 @@ Right click either the _Available launchers_ or _Visible launchers_ sections and
2. Optionally, set `hoistedNote` to hoist a particular note. See [Note Hoisting](../Navigation/Note%20Hoisting.md) for more information.
3. Optionally, set a `keyboardShortcut` to trigger the launcher.
2. **Script Launcher**
An advanced launcher which will run a script upon pressing. See [Scripts](../../Note%20Types/Code/Scripting.md) for more information.
An advanced launcher which will run a script upon pressing. See [Scripts](../../Scripting.md) for more information.
1. Set `script` to point to the desired script to run.
2. Optionally, set a `keyboardShortcut` to trigger the launcher.
3. **Custom Widget**
Allows defining a custom widget to be rendered inside the launcher. See [Widget Basics](../../Developer%20Guides/Widget%20Basics.md) for more information.
Allows defining a custom widget to be rendered inside the launcher. See [Widget Basics](../../Scripting/Custom%20Widgets/Widget%20Basics.md) for more information.
4. **Spacers**
Launchers that create some distance between other launchers for better visual distinction.

View File

@@ -1,17 +1,17 @@
# Note Tree
This page explains how to manipulate the note tree in TriliumNext, focusing on moving notes.
![](1_Note%20Tree_image.png)
![](Note%20Tree_image.png)
## Drag and Drop
![Drag and drop example](../../Attachments/drag-and-drop.gif)
![Drag and drop example](Note%20Tree_drag-and-drop.gif)
You can easily rearrange the note tree by dragging and dropping notes, as demonstrated in the example above.
## Keyboard Manipulation
![Example of using keyboard keys to move a note](../../Attachments/move-note-with-keyboard.gif)Trilium offers efficient keyboard-based manipulation using the following [shortcuts](../Keyboard%20Shortcuts.md):
![Example of using keyboard keys to move a note](Note%20Tree_move-note-with-k.gif)Trilium offers efficient keyboard-based manipulation using the following [shortcuts](../Keyboard%20Shortcuts.md):
* <kbd>Ctrl</kbd> + <kbd><span>↑</span></kbd> and <kbd>Ctrl</kbd> +<kbd><span>↓</span></kbd>: Move the note up or down in the order.
* <kbd>Ctrl</kbd>+<kbd><span>←</span></kbd>: Move the note up in the hierarchy by changing its parent to the note's grandparent.
@@ -22,12 +22,4 @@ You can easily rearrange the note tree by dragging and dropping notes, as demons
You can also move notes using the familiar cut and paste functions available in the context menu, or with the associated keyboard [shortcuts](../Keyboard%20Shortcuts.md): `CTRL-C` ( [copy](../Notes/Cloning%20Notes.md)), <kbd>Ctrl</kbd> + <kbd>X</kbd> (cut) and <kbd>Ctrl</kbd> + <kbd>V</kbd> (paste).
## Multiple selection
It is possible to select multiple notes at one time.
To do so, first select the note to start the selection with. Then hold Shift and click on the note to end the selection with. All the notes between the start and the end note will be selected as well.
![](Note%20Tree_image.png)
In the right-click menu, operations such as Cut, Copy, Move to, Clone to or Delete will apply to all the selected notes. It is also possible to apply [Bulk actions](../../Advanced%20Usage/Bulk%20actions.md) to them. The rest of the options will not be available and will appear disabled in the menu.
See <a class="reference-link" href="Note%20Tree/Note%20tree%20contextual%20menu.md">Note Tree Menu</a> for more information.

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

View File

@@ -0,0 +1,8 @@
# Multiple selection
It is possible to select multiple notes at one time.
To do so, first select the note to start the selection with. Then hold Shift and click on the note to end the selection with. All the notes between the start and the end note will be selected as well.
![](Multiple%20selection_image.png)
In the right-click menu, operations such as Cut, Copy, Move to, Clone to or Delete will apply to all the selected notes. It is also possible to apply <a class="reference-link" href="../../../Advanced%20Usage/Bulk%20Actions.md">Bulk Actions</a> to them. The rest of the options will not be available and will appear disabled in the menu.

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

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