Merge remote-tracking branch 'origin/develop' into calendar
4
.github/FUNDING.yml
vendored
@ -1,4 +1,4 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: [zadam]
|
||||
custom: ["https://paypal.me/za4am"]
|
||||
github: [eliandoran]
|
||||
custom: ["https://paypal.me/eliandoran"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
# TriliumNext Notes
|
||||
|
||||
 
|
||||
  
|
||||
|
||||
[English](./README.md) | [Chinese](./README-ZH_CN.md) | [Russian](./README.ru.md) | [Japanese](./README.ja.md) | [Italian](./README.it.md) | [Spanish](./README.es.md)
|
||||
|
||||
|
@ -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](../../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
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Weight Tracker
|
||||

|
||||
|
||||
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](../Templates.md) from which [day notes](Day%20Notes.md) are created, you can aggregate the data and plot weight change over time.
|
||||
|
||||
|
@ -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.
|
||||
|
||||

|
||||
## 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 Trilium’s 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
|
||||
|
||||
|
@ -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](../Templates.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.
|
@ -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 <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 <a class="reference-link" href="../Templates.md">Templates</a> for a similar concept. See <a class="reference-link" href="Attribute%20Inheritance.md">Attribute Inheritance</a> in the documentation.</td></tr><tr><td><code>renderNote</code></td><td>notes of type <a class="reference-link" href="../../Note%20Types/Render%20Note.md">Render Note</a> 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>
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 32 KiB |
87
docs/User Guide/User Guide/Advanced Usage/Bulk Actions.md
Normal 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)
|
||||
```
|
BIN
docs/User Guide/User Guide/Advanced Usage/Bulk Actions_image.png
Normal file
After Width: | Height: | Size: 82 KiB |
@ -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)
|
||||
```
|
@ -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.
|
@ -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
|
||||
|
||||
|
@ -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](Templates.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}`
|
18
docs/User Guide/User Guide/Advanced Usage/Hidden Notes.md
Normal file
BIN
docs/User Guide/User Guide/Advanced Usage/Hidden Notes_image.png
Normal file
After Width: | Height: | Size: 30 KiB |
@ -3,7 +3,7 @@ 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
|
||||
|
||||
@ -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
|
||||
@ -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 <a class="reference-link" href="Sharing/Serving%20directly%20the%20content%20o.md">Serving directly the content of a note</a> 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>
|
@ -23,7 +23,7 @@ To create an instance note through the UI:
|
||||
|
||||

|
||||
|
||||
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.
|
||||
|
||||
|
@ -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
|
||||
|
||||
@ -38,4 +38,13 @@ If you want to export just single note without its subtree, you can do it from N
|
||||
|
||||
### 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.
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
@ -5,4 +5,4 @@ Hoisting is a standard outliner feature which allows you to focus on (or "zoom i
|
||||
|
||||
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.
|
@ -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`).
|
After Width: | Height: | Size: 13 KiB |
@ -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
|
||||
|
||||
|
After Width: | Height: | Size: 92 KiB |
@ -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:
|
||||
|
||||

|
||||
|
||||
* visual identification of workspace in tabs:
|
||||

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

|
||||
|
||||
* visual identification of workspace in tabs:
|
||||

|
||||
|
||||
|
||||
### 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 <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>
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 9.0 KiB |
@ -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>
|
@ -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.
|
||||
|
@ -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.
|
@ -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.
|
||||
|
@ -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
|
||||
|
||||
|
Before Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 80 KiB |
@ -56,7 +56,7 @@ Right click either the _Available launchers_ or _Visible launchers_ sections and
|
||||
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](../../Scripting/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.
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Note Tree
|
||||
This page explains how to manipulate the note tree in TriliumNext, focusing on moving notes.
|
||||
|
||||

|
||||

|
||||
|
||||
## Drag and Drop
|
||||
|
||||
@ -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.
|
||||
|
||||

|
||||
|
||||
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.
|
After Width: | Height: | Size: 94 KiB |
@ -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.
|
||||
|
||||

|
||||
|
||||
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.
|
After Width: | Height: | Size: 7.3 KiB |
@ -0,0 +1,94 @@
|
||||
# Note tree contextual menu
|
||||
<figure class="image image-style-align-right"><img style="aspect-ratio:372/760;" src="1_Note tree contextual menu_.png" width="372" height="760"></figure>
|
||||
|
||||
The _note tree menu_ can be accessed by right-clicking in the <a class="reference-link" href="../Note%20Tree.md">Note Tree</a>.
|
||||
|
||||
## Interaction
|
||||
|
||||
The contextual menu can operate:
|
||||
|
||||
* On a single note, by right clicking it in the note tree.
|
||||
* On multiple notes, by selecting them first. See <a class="reference-link" href="Multiple%20selection.md">Multiple selection</a> on how to do so.
|
||||
* When right clicking, do note that usually the note being right clicked is also included in the affected notes, regardless of whether it was selected or not.
|
||||
|
||||
## Available options
|
||||
|
||||
> [!NOTE]
|
||||
> When multiple notes are selected, only a subset of notes will be active. The ones that do support multiple notes will mention this in the list below.
|
||||
|
||||
* **Open in a new tab**
|
||||
* Will open a single note in a new [tab](../Tabs.md).
|
||||
* **Open in a new split**
|
||||
* Will open a split to the right with the given note within the current tab.
|
||||
* **Hoist note**
|
||||
* Will focus the note tree on this note. See <a class="reference-link" href="../../Navigation/Note%20Hoisting.md">Note Hoisting</a> for more information.
|
||||
* **Insert note after**
|
||||
* Allows easy creation of a note with a specified [note type](../../../Note%20Types.md).
|
||||
* <a class="reference-link" href="../../../Advanced%20Usage/Templates.md">Templates</a> will also be present (if any) at the end of the list.
|
||||
* The note will be added on the same level of hierarchy as the note selected.
|
||||
* **Insert child note**
|
||||
* Same as _Insert note after_, but the note will be created as a child of the selected note.
|
||||
* **Protect subtree**
|
||||
* Will mark this note and all of its descendents as protected. See <a class="reference-link" href="../../Notes/Protected%20Notes.md">Protected Notes</a> for more information.
|
||||
* **Unprotect subtree**
|
||||
* Will unprotect this note and all of its descendents.
|
||||
* **Cut**
|
||||
* Will place the given notes in clipboard.
|
||||
* Use one of the two paste functions (or the keyboard shortcuts) to move them to the desired location.
|
||||
* **Copy / clone**
|
||||
* Will place the given notes in clipboard.
|
||||
* Use one of the two paste functions (or the keyboard shortcuts) to copy them to the desired location.
|
||||
* Note that the copy function here works according to the <a class="reference-link" href="../../Notes/Cloning%20Notes.md">Cloning Notes</a> functionality (i.e. the note itself will be present in two locations at once, and editing it in one place will edit it everywhere).
|
||||
* To simply create a duplicate note that can be modified independently, look for _Duplicate subtree_.
|
||||
* **Paste into**
|
||||
* If there are any notes in clipboard, they will be pasted as child notes to the right-clicked one.
|
||||
* **Paste after**
|
||||
* If there are any notes in clipboard, they will be pasted underneath the right-clicked one.
|
||||
* **Move to…**
|
||||
* Will display a modal to specify where to move the desired notes.
|
||||
* **Clone to…**
|
||||
* Will display a modal to specify where to [clone](../../Notes/Cloning%20Notes.md) the desired notes.
|
||||
* **Delete**
|
||||
* Will delete the given notes, asking for confirmation first.
|
||||
* In the dialog, the following options can be configured:
|
||||
* _Delete also all clones_ to ensure that the note will be deleted everywhere if it has been placed into multiple locations (see <a class="reference-link" href="../../Notes/Cloning%20Notes.md">Cloning Notes</a>).
|
||||
* _Erase notes permanently_ will ensure that the note cannot be recovered from <a class="reference-link" href="../Recent%20Changes.md">Recent Changes</a>.
|
||||
* **Import into note**
|
||||
* Opens the [import](../../Import%20%26%20Export) dialog and places the imported notes as child notes of the selected one.
|
||||
* **Export**
|
||||
* Opens the [export](../../Import%20%26%20Export) dialog for the selected notes.
|
||||
* **Search in subtree**
|
||||
* Opens a full <a class="reference-link" href="../../Navigation/Search.md">Search</a> with it preconfigured to only look into this note and its descendants (the _Ancestor_ field).
|
||||
|
||||
## Advanced options
|
||||
|
||||
<figure class="image image-style-align-right"><img style="aspect-ratio:289/355;" src="Note tree contextual menu_.png" width="289" height="355"></figure>
|
||||
|
||||
The advanced options menu offers some of the less frequently used actions for notes.
|
||||
|
||||
To access these options, first look for the _Advanced_ option in the contextual menu to reveal a sub-menu with:
|
||||
|
||||
* **Apply bulk actions**
|
||||
* Opens the <a class="reference-link" href="../../../Advanced%20Usage/Bulk%20Actions.md">Bulk Actions</a> dialog, to apply actions such as adding labels or moving notes to multiple notes at once (see <a class="reference-link" href="Multiple%20selection.md">Multiple selection</a>).
|
||||
* **Edit branch prefix**
|
||||
* Opens a dialog to assign a name to be able to distinguish [clones](../../Notes/Cloning%20Notes.md), see <a class="reference-link" href="../../Notes/Cloning%20Notes/Branch%20prefix.md">Branch prefix</a> for more information.
|
||||
* **Convert to attachment**
|
||||
* Converts the selected notes to <a class="reference-link" href="../../Notes/Attachments.md">Attachments</a> of their parent notes.
|
||||
* This functional is most useful when dealing with image <a class="reference-link" href="../../../Note%20Types/File.md">File</a> notes that were imported from an external source or an older version of Trilium.
|
||||
* **Duplicate subtree**
|
||||
* Creates a copy of the note and its descendants.
|
||||
* This process is different from <a class="reference-link" href="../../Notes/Cloning%20Notes.md">Cloning Notes</a> since the duplicated note can be edited independently from the original.
|
||||
* An alternative to this, if done regularly, would be <a class="reference-link" href="../../../Advanced%20Usage/Templates.md">Templates</a>.
|
||||
* **Expand subtree**
|
||||
* Expands all the child notes in the <a class="reference-link" href="../Note%20Tree.md">Note Tree</a>.
|
||||
* **Collapse subtree**
|
||||
* Collapses all the child notes in the note tree.
|
||||
* **Sort by…**
|
||||
* Opens a dialog to sort all the child notes of the selected note.
|
||||
* The sorting is done only once, there is an automatic sorting mechanism as well that can be set using <a class="reference-link" href="../../../Advanced%20Usage/Attributes.md">Attributes</a>.
|
||||
* See <a class="reference-link" href="../../Notes/Sorting%20Notes.md">Sorting Notes</a> for more information.
|
||||
* **Copy note path to clipboard**
|
||||
* Copies a URL fragment representing the full path to this branch for a note, such as `#root/Hb2E70L7HPuf/4sRFgMZhYFts/2IVuShedRJ3U/LJVMvKXOFv7n`.
|
||||
* The URL to manually create <a class="reference-link" href="../../../Note%20Types/Text/Links.md">Links</a> within notes, or for note <a class="reference-link" href="../../Navigation">Navigation</a>.
|
||||
* **Recent changes in subtree**
|
||||
* This will open <a class="reference-link" href="../Recent%20Changes.md">Recent Changes</a>, but filtered to only the changes related to this note or one of its descendants.
|
After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 17 KiB |
@ -0,0 +1,14 @@
|
||||
# Recent Changes
|
||||
<figure class="image image-style-align-center image_resized" style="width:50%;"><img style="aspect-ratio:988/572;" src="1_Recent Changes_image.png" width="988" height="572"></figure>
|
||||
|
||||
## Accessing the recent changes
|
||||
|
||||
* For an overview of the changes across all documents, press the <img src="Recent Changes_image.png" width="25" height="21"> button in the <a class="reference-link" href="Launch%20Bar.md">Launch Bar</a>.
|
||||
* If there is a [hoisted note](../Navigation/Note%20Hoisting.md) or a [workspace](../Navigation/Workspaces.md), the list of recent changes will be limited to the descendents of the hoisted note, or the workspace.
|
||||
* To limit the list of recent changes to a note and its descendants, look for the corresponding option in the <a class="reference-link" href="Note%20Tree/Note%20tree%20contextual%20menu.md">Note tree contextual menu</a> → Advanced.
|
||||
|
||||
## Interaction
|
||||
|
||||
* Notes which were changed will appear in reverse chronological order (latest update first).
|
||||
* The title of the note is displayed, as well as the note path. Clicking on the note title will dismiss the dialog and navigate to that particular note.
|
||||
* Deleted notes will also be listed here, at their time of deletion. Press the _Undelete_ link next to them in order to recover them.
|
After Width: | Height: | Size: 1.4 KiB |
@ -61,4 +61,6 @@ This section displays information about the current note:
|
||||
|
||||
### Edited notes
|
||||
|
||||
This section pops automatically when entering a [day note](../../Advanced%20Usage/Advanced%20Showcases/Day%20Notes.md) and shows the notes that were edited that day.
|
||||
This section pops automatically when entering a [day note](../../Advanced%20Usage/Advanced%20Showcases/Day%20Notes.md) and shows the notes that were edited that day.
|
||||
|
||||
It is possible to disable this behavior from settings, by going to <a class="reference-link" href="#root/_hidden/_options/_optionsAppearance">Appearance</a> settings and looking for the _Ribbon widgets_ section.
|
@ -1,29 +0,0 @@
|
||||
# Events
|
||||
[Script](../../Scripting.md) notes can be triggered by events. Note that these are backend events and thus relation need to point to the "JS backend" code note.
|
||||
|
||||
## Global events
|
||||
|
||||
Global events are attached to the script note via label. Simply create e.g. "run" label with some of these values and script note will be executed once the event occurs.
|
||||
|
||||
* `run`
|
||||
* `frontendStartup` - executes on frontend upon startup
|
||||
* `mobileStartup` - executes on mobile frontend upon startup
|
||||
* `backendStartup` - executes on backend upon startup
|
||||
* `hourly` - executes once an hour on backend
|
||||
* `daily` - executes once a day on backend
|
||||
|
||||
## Entity events
|
||||
|
||||
Other events are bound to some entity, these are defined as [relations](../../Advanced%20Usage/Attributes.md) - meaning that script is triggered only if note has this script attached to it through relations (or it can inherit it).
|
||||
|
||||
* `runOnNoteCreation` - executes when note is created on backend
|
||||
* `runOnNoteTitleChange` - executes when note title is changed (includes note creation as well)
|
||||
* `runOnNoteContentChange` - executes when note content is changed (includes note creation as well).
|
||||
* `runOnNoteChange` - executes when note is changed (includes note creation as well)
|
||||
* `runOnNoteDeletion` - executes when note is being deleted
|
||||
* `runOnBranchCreation` - executes when a branch is created. Branch is a link between parent note and child note and is created e.g. when cloning or moving note.
|
||||
* `runOnBranchChange` (since v0.62) - executes when a branch is changed - either expanded status or prefix are changed.
|
||||
* `runOnBranchDeletion` - executes when a branch is delete. Branch is a link between parent note and child note and is deleted e.g. when moving note (old branch/link is deleted).
|
||||
* `runOnChildNoteCreation` - executes when new note is created under _this_ note
|
||||
* `runOnAttributeCreation` - executes when new attribute is created under _this_ note
|
||||
* `runOnAttributeChange` - executes when attribute is changed under _this_ note
|
@ -5,4 +5,4 @@ Trilium allows you to save common searches as notes within the note tree. The se
|
||||
|
||||
## Location
|
||||
|
||||
By default, saved searches are stored in the day note. However, you can designate a different note to store saved searches by marking it with the `#searchHome` label. Additionally, for [workspaces](../Basic%20Concepts%20and%20Features/Navigation/Workspace.md), you can use the `#workspaceSearchHome` label to specify a storage location for saved searches within that workspace.
|
||||
By default, saved searches are stored in the day note. However, you can designate a different note to store saved searches by marking it with the `#searchHome` label. Additionally, for [workspaces](../Basic%20Concepts%20and%20Features/Navigation/Workspaces.md), you can use the `#workspaceSearchHome` label to specify a storage location for saved searches within that workspace.
|
@ -1,5 +1,5 @@
|
||||
# Scripting
|
||||
Trilium supports creating <a class="reference-link" href="Note%20Types/Code.md">Code</a> notes, i.e. notes which allow you to store some programming code and highlight it. Special case is JavaScript code notes which can also be executed inside Trilium which can in conjunction with <a class="reference-link" href="Note%20Types/Code/Script%20API.md">Script API</a> provide extra functionality.
|
||||
Trilium supports creating <a class="reference-link" href="Note%20Types/Code.md">Code</a> notes, i.e. notes which allow you to store some programming code and highlight it. Special case is JavaScript code notes which can also be executed inside Trilium which can in conjunction with <a class="reference-link" href="Scripting/Script%20API.md">Script API</a> provide extra functionality.
|
||||
|
||||
## Scripting
|
||||
|
||||
@ -34,8 +34,8 @@ You can see more scripting with explanation in <a class="reference-link" href="
|
||||
|
||||
## Events
|
||||
|
||||
See <a class="reference-link" href="Note%20Types/Code/Events.md">Events</a>.
|
||||
See <a class="reference-link" href="Scripting/Events.md">Events</a>.
|
||||
|
||||
## Script API
|
||||
|
||||
See <a class="reference-link" href="Note%20Types/Code/Script%20API.md">Script API</a>.
|
||||
See <a class="reference-link" href="Scripting/Script%20API.md">Script API</a>.
|
@ -22,10 +22,10 @@ module.exports = new MyWidget();
|
||||
To implement this widget:
|
||||
|
||||
1. Create a new `JS Frontend` note in Trilium and paste in the code above.
|
||||
2. Assign the `#widget` [attribute](../Advanced%20Usage/Attributes.md) to the [note](../Basic%20Concepts%20and%20Features/Notes.md).
|
||||
2. Assign the `#widget` [attribute](../../Advanced%20Usage/Attributes.md) to the [note](../../Basic%20Concepts%20and%20Features/Notes.md).
|
||||
3. Restart Trilium or reload the window.
|
||||
|
||||
To verify that the widget is working, open the developer tools (`Cmd` + `Shift` + `I`) and run `document.querySelector("#my-widget")`. If the element is found, the widget is functioning correctly. If `undefined` is returned, double-check that the [note](../Basic%20Concepts%20and%20Features/Notes.md) has the `#widget` [attribute](../Advanced%20Usage/Attributes.md).
|
||||
To verify that the widget is working, open the developer tools (`Cmd` + `Shift` + `I`) and run `document.querySelector("#my-widget")`. If the element is found, the widget is functioning correctly. If `undefined` is returned, double-check that the [note](../../Basic%20Concepts%20and%20Features/Notes.md) has the `#widget` [attribute](../../Advanced%20Usage/Attributes.md).
|
||||
|
||||
### Step 2: Adding an UI Element
|
||||
|
||||
@ -85,7 +85,7 @@ After reloading Trilium, the button should now appear at the bottom left of the
|
||||
|
||||
### Step 4: Adding User Interaction
|
||||
|
||||
Let’s make the button interactive by showing a message when it’s clicked. We'll use the `api.showMessage` method from the [Script API](../Note%20Types/Code/Script%20API.md).
|
||||
Let’s make the button interactive by showing a message when it’s clicked. We'll use the `api.showMessage` method from the [Script API](../Script%20API.md).
|
||||
|
||||
```
|
||||
class MyWidget extends api.BasicWidget {
|
@ -1,8 +1,8 @@
|
||||
# Word count widget
|
||||
> [!TIP]
|
||||
> This widget is also present in new installations in the <a class="reference-link" href="../../../Advanced%20Usage/Database/Demo%20Notes.md">Demo Notes</a>.
|
||||
> This widget is also present in new installations in the <a class="reference-link" href="../../Advanced%20Usage/Database/Demo%20Notes.md">Demo Notes</a>.
|
||||
|
||||
Create a <a class="reference-link" href="../../Code.md">Code</a> note of type JS frontend and **give it a** `#widget` **label**.
|
||||
Create a <a class="reference-link" href="../../Note%20Types/Code.md">Code</a> note of type JS frontend and **give it a** `#widget` **label**.
|
||||
|
||||
```
|
||||
/*
|
||||
@ -82,7 +82,7 @@ class WordCountWidget extends api.NoteContextAwareWidget {
|
||||
module.exports = new WordCountWidget();
|
||||
```
|
||||
|
||||
After you make changes it is necessary to [restart Trilium](../../../Troubleshooting/Refreshing%20the%20application.md) so that the layout can be rebuilt.
|
||||
After you make changes it is necessary to [restart Trilium](../../Troubleshooting/Refreshing%20the%20application.md) so that the layout can be rebuilt.
|
||||
|
||||
At the bottom of the note you can see the resulting widget:
|
||||
|
Before Width: | Height: | Size: 108 KiB After Width: | Height: | Size: 108 KiB |
14
docs/User Guide/User Guide/Scripting/Events.md
Normal file
@ -0,0 +1,14 @@
|
||||
# Events
|
||||
[Script](../Scripting.md) notes can be triggered by events. Note that these are backend events and thus relation need to point to the "JS backend" code note.
|
||||
|
||||
## Global events
|
||||
|
||||
Global events are attached to the script note via label. Simply create e.g. "run" label with some of these values and script note will be executed once the event occurs.
|
||||
|
||||
<figure class="table"><table><thead><tr><th>Label</th><th>Description</th></tr></thead><tbody><tr><td><code>run</code></td><td><p>Defines on which events script should run. Possible values are:</p><ul><li><code>frontendStartup</code> - when Trilium frontend starts up (or is refreshed), but not on mobile.</li><li><code>mobileStartup</code> - when Trilium frontend starts up (or is refreshed), on mobile.</li><li><code>backendStartup</code> - when Trilium backend starts up</li><li><code>hourly</code> - run once an hour. You can use additional label <code>runAtHour</code> to specify at which hour, on the back-end.</li><li><code>daily</code> - run once a day, on the back-end</li></ul></td></tr><tr><td><code>runOnInstance</code></td><td>Specifies that the script should only run on a particular <a class="reference-link" href="../Advanced%20Usage/Configuration%20(config.ini%20or%20environment%20variables)/Trilium%20instance.md">Trilium instance</a>.</td></tr><tr><td><code>runAtHour</code></td><td>On which hour should this run. Should be used together with <code>#run=hourly</code>. Can be defined multiple times for more runs during the day.</td></tr></tbody></table></figure>
|
||||
|
||||
## Entity events
|
||||
|
||||
Other events are bound to some entity, these are defined as [relations](../Advanced%20Usage/Attributes.md) - meaning that script is triggered only if note has this script attached to it through relations (or it can inherit it).
|
||||
|
||||
<figure class="table"><table><thead><tr><th>Relation</th><th>Description</th></tr></thead><tbody><tr><td><code>runOnNoteCreation</code></td><td>executes when note is created on backend. Use this relation if you want to run the script for all notes created under a specific subtree. In that case, create it on the subtree root note and make it inheritable. A new note created within the subtree (any depth) will trigger the script.</td></tr><tr><td><code>runOnChildNoteCreation</code></td><td>executes when new note is created under the note where this relation is defined</td></tr><tr><td><code>runOnNoteTitleChange</code></td><td>executes when note title is changed (includes note creation as well)</td></tr><tr><td><code>runOnNoteContentChange</code></td><td>executes when note content is changed (includes note creation as well).</td></tr><tr><td><code>runOnNoteChange</code></td><td>executes when note is changed (includes note creation as well). Does not include content changes</td></tr><tr><td><code>runOnNoteDeletion</code></td><td>executes when note is being deleted</td></tr><tr><td><code>runOnBranchCreation</code></td><td>executes when a branch is created. Branch is a link between parent note and child note and is created e.g. when cloning or moving note.</td></tr><tr><td><code>runOnBranchChange</code></td><td>executes when a branch is updated. (since v0.62)</td></tr><tr><td><code>runOnBranchDeletion</code></td><td>executes when a branch is deleted. Branch is a link between parent note and child note and is deleted e.g. when moving note (old branch/link is deleted).</td></tr><tr><td><code>runOnAttributeCreation</code></td><td>executes when new attribute is created for the note which defines this relation</td></tr><tr><td><code>runOnAttributeChange</code></td><td>executes when the attribute is changed of a note which defines this relation. This is triggered also when the attribute is deleted</td></tr></tbody></table></figure>
|
@ -1,7 +1,7 @@
|
||||
# Frontend Basics
|
||||
## Frontend API
|
||||
|
||||
The frontend api supports two styles, regular scripts that are run with the current app and note context, and widgets that export an object to Trilium to be used in the UI. In both cases, the frontend api of Trilium is available to scripts running in the frontend context as global variable `api`. The members and methods of the api can be seen on the [Script API](../Note%20Types/Code/Script%20API.md) page.
|
||||
The frontend api supports two styles, regular scripts that are run with the current app and note context, and widgets that export an object to Trilium to be used in the UI. In both cases, the frontend api of Trilium is available to scripts running in the frontend context as global variable `api`. The members and methods of the api can be seen on the [Script API](Script%20API.md) page.
|
||||
|
||||
## Scripts
|
||||
|
||||
@ -54,4 +54,4 @@ Conversely to scripts, widgets do have some specific requirements in order to wo
|
||||
|
||||
### Tutorial
|
||||
|
||||
For more information on building widgets, take a look at [Widget Basics](Widget%20Basics.md).
|
||||
For more information on building widgets, take a look at [Widget Basics](Custom%20Widgets/Widget%20Basics.md).
|
@ -21,7 +21,7 @@ TRILIUM_START_NOTE_ID=root ./trilium
|
||||
|
||||
## Broken Script Prevents Application Startup
|
||||
|
||||
If a custom script causes Triliumto crash, and it is set as a startup script or in an active [custom widget](Note%20Types/Code/Custom%20Widgets.md), start Triliumin "safe mode" to prevent any custom scripts from executing:
|
||||
If a custom script causes Triliumto crash, and it is set as a startup script or in an active [custom widget](Scripting/Custom%20Widgets.md), start Triliumin "safe mode" to prevent any custom scripts from executing:
|
||||
|
||||
```
|
||||
TRILIUM_SAFE_MODE=true ./trilium
|
||||
|
@ -117,3 +117,17 @@ test("Search works when dismissing a tab", async ({ page, context }) => {
|
||||
await app.openAndClickNoteActionMenu("Search in note");
|
||||
await expect(app.findAndReplaceWidget).toBeVisible();
|
||||
});
|
||||
|
||||
test("New tab displays workspaces", async ({ page, context }) => {
|
||||
const app = new App(page, context);
|
||||
await app.goto();
|
||||
|
||||
const workspaceNotesEl = app.currentNoteSplitContent.locator(".workspace-notes");
|
||||
await expect(workspaceNotesEl).toBeVisible();
|
||||
expect(workspaceNotesEl).toContainText("Personal");
|
||||
expect(workspaceNotesEl).toContainText("Work");
|
||||
await expect(workspaceNotesEl.locator(".bx.bxs-user")).toBeVisible();
|
||||
await expect(workspaceNotesEl.locator(".bx.bx-briefcase-alt")).toBeVisible();
|
||||
|
||||
await app.closeAllTabs();
|
||||
});
|
||||
|
@ -9,6 +9,7 @@ import type { WriteStream } from "fs";
|
||||
import debounce from "./src/public/app/services/debounce.js";
|
||||
import { extractZip, initializeDatabase, startElectron } from "./electron-utils.js";
|
||||
import cls from "./src/services/cls.js";
|
||||
import type { AdvancedExportOptions } from "./src/services/export/zip.js";
|
||||
|
||||
const NOTE_ID_USER_GUIDE = "pOsGYCXsbNQG";
|
||||
const markdownPath = path.join("docs", "User Guide");
|
||||
@ -69,7 +70,54 @@ async function exportData(format: "html" | "markdown", outputPath: string) {
|
||||
|
||||
// First export as zip.
|
||||
const { exportToZipFile } = (await import("./src/services/export/zip.js")).default;
|
||||
await exportToZipFile(NOTE_ID_USER_GUIDE, format, zipFilePath);
|
||||
|
||||
const exportOpts: AdvancedExportOptions = {};
|
||||
if (format === "html") {
|
||||
exportOpts.customRewriteLinks = (originalRewriteLinks, getNoteTargetUrl) => {
|
||||
return (content: string, noteMeta: NoteMeta) => {
|
||||
content = content.replace(/src="[^"]*api\/images\/([a-zA-Z0-9_]+)\/[^"]*"/g, (match, targetNoteId) => {
|
||||
const url = getNoteTargetUrl(targetNoteId, noteMeta);
|
||||
|
||||
return url ? `src="${url}"` : match;
|
||||
});
|
||||
|
||||
content = content.replace(/src="[^"]*api\/attachments\/([a-zA-Z0-9_]+)\/image\/[^"]*"/g, (match, targetAttachmentId) => {
|
||||
const url = findAttachment(targetAttachmentId);
|
||||
|
||||
return url ? `src="${url}"` : match;
|
||||
});
|
||||
|
||||
content = content.replace(/href="[^"]*#root[^"]*attachmentId=([a-zA-Z0-9_]+)\/?"/g, (match, targetAttachmentId) => {
|
||||
const url = findAttachment(targetAttachmentId);
|
||||
|
||||
return url ? `href="${url}"` : match;
|
||||
});
|
||||
|
||||
content = content.replace(/href="[^"]*#root[a-zA-Z0-9_\/]*\/([a-zA-Z0-9_]+)[^"]*"/g, (match, targetNoteId) => {
|
||||
const components = match.split("/");
|
||||
components[components.length - 1] = `_help_${components[components.length - 1]}`;
|
||||
return components.join("/");
|
||||
});
|
||||
|
||||
return content;
|
||||
|
||||
function findAttachment(targetAttachmentId: string) {
|
||||
let url;
|
||||
|
||||
const attachmentMeta = (noteMeta.attachments || []).find((attMeta) => attMeta.attachmentId === targetAttachmentId);
|
||||
if (attachmentMeta) {
|
||||
// easy job here, because attachment will be in the same directory as the note's data file.
|
||||
url = attachmentMeta.dataFileName;
|
||||
} else {
|
||||
console.info(`Could not find attachment meta object for attachmentId '${targetAttachmentId}'`);
|
||||
}
|
||||
return url;
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
await exportToZipFile(NOTE_ID_USER_GUIDE, format, zipFilePath, exportOpts);
|
||||
await extractZip(zipFilePath, outputPath);
|
||||
} finally {
|
||||
if (await fsExtra.exists(zipFilePath)) {
|
||||
|
@ -1,5 +1,6 @@
|
||||
import eslint from "@eslint/js";
|
||||
import tseslint from "typescript-eslint";
|
||||
import simpleImportSort from "eslint-plugin-simple-import-sort";
|
||||
|
||||
export default tseslint.config(
|
||||
eslint.configs.recommended,
|
||||
@ -16,6 +17,11 @@ export default tseslint.config(
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
plugins: {
|
||||
"simple-import-sort": simpleImportSort
|
||||
}
|
||||
},
|
||||
{
|
||||
rules: {
|
||||
// add rule overrides here
|
||||
@ -28,7 +34,8 @@ export default tseslint.config(
|
||||
varsIgnorePattern: "^_"
|
||||
}
|
||||
],
|
||||
"sort-imports": [ "error", { ignoreCase: false } ]
|
||||
"simple-import-sort/imports": "error",
|
||||
"simple-import-sort/exports": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
648
package-lock.json
generated
19
package.json
@ -2,7 +2,7 @@
|
||||
"name": "trilium",
|
||||
"productName": "TriliumNext Notes",
|
||||
"description": "Build your personal knowledge base with TriliumNext Notes",
|
||||
"version": "0.92.6",
|
||||
"version": "0.92.7",
|
||||
"license": "AGPL-3.0-only",
|
||||
"main": "./electron-main.js",
|
||||
"author": {
|
||||
@ -74,7 +74,7 @@
|
||||
"@braintree/sanitize-url": "7.1.1",
|
||||
"@electron/remote": "2.1.2",
|
||||
"@highlightjs/cdn-assets": "11.11.1",
|
||||
"@triliumnext/express-partial-content": "1.0.1",
|
||||
"@triliumnext/express-partial-content": "1.1.0",
|
||||
"archiver": "7.0.1",
|
||||
"async-mutex": "0.5.0",
|
||||
"autocomplete.js": "0.38.1",
|
||||
@ -100,7 +100,7 @@
|
||||
"electron-window-state": "5.0.3",
|
||||
"escape-html": "1.0.3",
|
||||
"eslint-linter-browserify": "9.24.0",
|
||||
"express": "4.21.2",
|
||||
"express": "5.1.0",
|
||||
"express-openid-connect": "^2.17.1",
|
||||
"express-rate-limit": "7.5.0",
|
||||
"express-session": "1.18.1",
|
||||
@ -123,8 +123,8 @@
|
||||
"jquery.fancytree": "2.38.5",
|
||||
"js-yaml": "4.1.0",
|
||||
"jsdom": "26.0.0",
|
||||
"katex": "0.16.21",
|
||||
"marked": "15.0.7",
|
||||
"katex": "0.16.22",
|
||||
"marked": "15.0.8",
|
||||
"mime-types": "3.0.1",
|
||||
"multer": "1.4.5-lts.2",
|
||||
"normalize-strings": "1.1.1",
|
||||
@ -218,8 +218,9 @@
|
||||
"copy-webpack-plugin": "13.0.0",
|
||||
"cross-env": "7.0.3",
|
||||
"css-loader": "7.1.2",
|
||||
"electron": "35.1.4",
|
||||
"electron": "35.1.5",
|
||||
"eslint": "9.24.0",
|
||||
"eslint-plugin-simple-import-sort": "12.1.1",
|
||||
"esm": "3.2.25",
|
||||
"globals": "16.0.0",
|
||||
"happy-dom": "17.4.4",
|
||||
@ -251,12 +252,12 @@
|
||||
"ts-loader": "9.5.2",
|
||||
"tslib": "2.8.1",
|
||||
"tsx": "4.19.3",
|
||||
"typedoc": "0.28.1",
|
||||
"typedoc": "0.28.2",
|
||||
"typescript": "5.8.3",
|
||||
"typescript-eslint": "8.29.0",
|
||||
"typescript-eslint": "8.29.1",
|
||||
"vanilla-js-wheel-zoom": "9.0.4",
|
||||
"vitest": "3.1.1",
|
||||
"webpack": "5.98.0",
|
||||
"webpack": "5.99.5",
|
||||
"webpack-cli": "6.0.1",
|
||||
"webpack-dev-middleware": "7.4.2"
|
||||
},
|
||||
|
2
src/express.d.ts
vendored
@ -20,6 +20,8 @@ export declare module "express-serve-static-core" {
|
||||
"trilium-component-id"?: string;
|
||||
"trilium-local-now-datetime"?: string;
|
||||
"trilium-hoisted-note-id"?: string;
|
||||
|
||||
"user-agent"?: string;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
1810
src/public/app/doc_notes/en/User Guide/!!!meta.json
generated
@ -13,18 +13,18 @@
|
||||
<h1 data-trilium-h1>Advanced Showcases</h1>
|
||||
|
||||
<div class="ck-content">
|
||||
<p>Trilium offers advanced functionality through <a href="../Scripting.html">Scripts</a> and
|
||||
<p>Trilium offers advanced functionality through <a href="#root/_help_CdNpE2pqjmI6">Scripts</a> and
|
||||
<a
|
||||
href="Attributes/Promoted%20Attributes.html">Promoted Attributes</a>. To illustrate these features, we've prepared
|
||||
several showcases available in the <a href="Database.html">demo notes</a>:</p>
|
||||
href="#root/_help_OFXdgB2nNk1F">Promoted Attributes</a>. To illustrate these features, we've prepared
|
||||
several showcases available in the <a href="#root/_help_wX4HbRucYSDD">demo notes</a>:</p>
|
||||
<ul>
|
||||
<li><a href="../Note%20Types/Relation%20Map.html">Relation Map</a>
|
||||
<li><a href="#root/_help_iRwzGnHPzonm">Relation Map</a>
|
||||
</li>
|
||||
<li><a href="Advanced%20Showcases/Day%20Notes.html">Day Notes</a>
|
||||
<li><a href="#root/_help_l0tKav7yLHGF">Day Notes</a>
|
||||
</li>
|
||||
<li><a href="Advanced%20Showcases/Weight%20Tracker.html">Weight Tracker</a>
|
||||
<li><a href="#root/_help_R7abl2fc6Mxi">Weight Tracker</a>
|
||||
</li>
|
||||
<li><a href="Advanced%20Showcases/Task%20Manager.html">Task Manager</a>
|
||||
<li><a href="#root/_help_xYjQUYhpbUEW">Task Manager</a>
|
||||
</li>
|
||||
</ul>
|
||||
<p>It's important to note that these examples are not natively supported
|
||||
|
@ -27,7 +27,7 @@
|
||||
<p>
|
||||
<img src="1_Day Notes_image.png">
|
||||
</p>
|
||||
<p>This pattern works well also because of <a href="../../Basic%20Concepts%20and%20Features/Notes/Cloning%20Notes.html">Cloning Notes</a> functionality
|
||||
<p>This pattern works well also because of <a href="#root/_help_IakOLONlIfGI">Cloning Notes</a> functionality
|
||||
- note can appear in multiple places in the note tree, so besides appearing
|
||||
under day note, it can also be categorized into other notes.</p>
|
||||
<h2>Demo</h2>
|
||||
@ -38,9 +38,9 @@
|
||||
- there's a note for the whole year 2025, under it, you have "03 - March"
|
||||
which then contains "09 - Monday". This is our "day note" which contains
|
||||
some text in its content and also has some child notes (some of them are
|
||||
from <a href="Task%20Manager.html">Task manager</a>).</p>
|
||||
<p>You can also notice how this day note has <a href="../Attributes/Promoted%20Attributes.html">promoted attribute</a> "weight"
|
||||
where you can track your daily weight. This data is then used in <a href="Weight%20Tracker.html">Weight tracker</a>.</p>
|
||||
from <a href="#root/_help_xYjQUYhpbUEW">Task manager</a>).</p>
|
||||
<p>You can also notice how this day note has <a href="#root/_help_OFXdgB2nNk1F">promoted attribute</a> "weight"
|
||||
where you can track your daily weight. This data is then used in <a href="#root/_help_R7abl2fc6Mxi">Weight tracker</a>.</p>
|
||||
<h2>Week Note and Quarter Note</h2>
|
||||
<p>Week and quarter notes are disabled by default, since it might be too
|
||||
much for some people. To enable them, you need to set <code>#enableWeekNotes</code> and <code>#enableQuarterNotes</code> attributes
|
||||
@ -49,7 +49,7 @@
|
||||
you already have some week notes created, it will not automatically change
|
||||
the existing week notes and might lead to some duplicates.</p>
|
||||
<h2>Templates</h2>
|
||||
<p>Trilium provides <a href="../Templates.html">template</a> functionality,
|
||||
<p>Trilium provides <a href="#root/_help_KC1HB96bqqHX">template</a> functionality,
|
||||
and it could be used together with day notes.</p>
|
||||
<p>You can define one of the following relations on the root of the journal
|
||||
(identified by <code>#calendarRoot</code> label):</p>
|
||||
|
@ -13,9 +13,9 @@
|
||||
<h1 data-trilium-h1>Task Manager</h1>
|
||||
|
||||
<div class="ck-content">
|
||||
<p>Task Manager is a <a href="../Attributes/Promoted%20Attributes.html">promoted attributes</a> and
|
||||
<p>Task Manager is a <a href="#root/_help_OFXdgB2nNk1F">promoted attributes</a> and
|
||||
<a
|
||||
href="../../Scripting.html">scripts</a>showcase present in the <a href="../Database.html">demo notes</a>.</p>
|
||||
href="#root/_help_CdNpE2pqjmI6">scripts</a>showcase present in the <a href="#root/_help_wX4HbRucYSDD">demo notes</a>.</p>
|
||||
<h2>Demo</h2>
|
||||
<p>
|
||||
<img src="Task Manager_task-manager.png">
|
||||
@ -24,23 +24,22 @@
|
||||
doneDate attribute). Outstanding tasks are further categorized by location
|
||||
and arbitrary tags - whenever you change tag attribute in the task note,
|
||||
this task is then automatically moved to appropriate location.</p>
|
||||
<p>Task Manager also integrates with <a href="Day%20Notes.html">day notes</a> -
|
||||
notes are <a href="../../Basic%20Concepts%20and%20Features/Notes/Cloning%20Notes.html">cloned</a> into
|
||||
day note to both todoDate note and doneDate note (with <a href="../../Basic%20Concepts%20and%20Features/Navigation/Tree%20Concepts.html">prefix</a> of
|
||||
<p>Task Manager also integrates with <a href="#root/_help_l0tKav7yLHGF">day notes</a> -
|
||||
notes are <a href="#root/_help_IakOLONlIfGI">cloned</a> into day note to
|
||||
both todoDate note and doneDate note (with <a href="#root/_help_kBrnXNG3Hplm">prefix</a> of
|
||||
either "TODO" or "DONE").</p>
|
||||
<h2>Implementation</h2>
|
||||
<p>New tasks are created in the TODO note which has <code>~child:template</code>
|
||||
<a
|
||||
href="../Attributes.html">relation</a>(see <a href="../Attributes/Attribute%20Inheritance.html">attribute inheritance</a>)
|
||||
href="#root/_help_zEY4DaJG4YT5">relation</a>(see <a href="#root/_help_bwZpz2ajCEwO">attribute inheritance</a>)
|
||||
pointing to the task template.</p>
|
||||
<h3>Attributes</h3>
|
||||
<p>Task template defines several <a href="../Attributes/Promoted%20Attributes.html">promoted attributes</a> -
|
||||
<p>Task template defines several <a href="#root/_help_OFXdgB2nNk1F">promoted attributes</a> -
|
||||
todoDate, doneDate, tags, location. Importantly it also defines <code>~runOnAttributeChange</code> relation
|
||||
- <a href="../../Note%20Types/Code/Events.html">event</a> handler which is
|
||||
run on attribute change. This <a href="../../Scripting.html">script</a> handles
|
||||
when e.g. we fill out the doneDate attribute - meaning the task is done
|
||||
and should be moved to "Done" note and removed from TODO, locations and
|
||||
tags.</p>
|
||||
- <a href="#root/_help_GPERMystNGTB">event</a> handler which is run on attribute
|
||||
change. This <a href="#root/_help_CdNpE2pqjmI6">script</a> handles when e.g.
|
||||
we fill out the doneDate attribute - meaning the task is done and should
|
||||
be moved to "Done" note and removed from TODO, locations and tags.</p>
|
||||
<h3>New task button</h3>
|
||||
<p>There's also "button" note which contains simple script which adds a button
|
||||
to create new note (task) in the TODO note.</p><pre><code class="language-text-x-trilium-auto">api.addButtonToToolbar({
|
||||
@ -64,7 +63,7 @@
|
||||
<h3>CSS</h3>
|
||||
<p>In the demo screenshot above you may notice that TODO tasks are in red
|
||||
color and DONE tasks are green.</p>
|
||||
<p>This is done by having this CSS <a href="../../Note%20Types/Code.html">code note</a> which
|
||||
<p>This is done by having this CSS <a href="#root/_help_6f9hih2hXXZk">code note</a> which
|
||||
defines extra CSS classes:</p><pre><code class="language-text-x-trilium-auto">span.fancytree-node.todo .fancytree-title {
|
||||
color: red !important;
|
||||
}
|
||||
@ -72,9 +71,9 @@
|
||||
span.fancytree-node.done .fancytree-title {
|
||||
color: green !important;
|
||||
}</code></pre>
|
||||
<p>This <a href="../../Note%20Types/Code.html">code note</a> has <code>#appCss</code>
|
||||
<p>This <a href="#root/_help_6f9hih2hXXZk">code note</a> has <code>#appCss</code>
|
||||
<a
|
||||
href="../Attributes.html">label</a>which is recognized by Trilium on startup and loaded as CSS into
|
||||
href="#root/_help_zEY4DaJG4YT5">label</a>which is recognized by Trilium on startup and loaded as CSS into
|
||||
the application.</p>
|
||||
<p>Second part of this functionality is based in event handler described
|
||||
above which assigns <code>#cssClass</code> label to the task to either "done"
|
||||
|
@ -16,19 +16,19 @@
|
||||
<p>
|
||||
<img src="Weight Tracker_image.png">
|
||||
</p>
|
||||
<p>The <code>Weight Tracker</code> is a <a href="../../Note%20Types/Code/Script%20API.html">Script API</a> showcase
|
||||
present in the <a href="../Database.html">demo notes</a>.</p>
|
||||
<p>By adding <code>weight</code> as a <a href="../Attributes/Promoted%20Attributes.html">promoted attribute</a> in
|
||||
the <a href="../Templates.html">template</a> from which <a href="Day%20Notes.html">day notes</a> are
|
||||
<p>The <code>Weight Tracker</code> is a <a href="#root/_help_GLks18SNjxmC">Script API</a> showcase
|
||||
present in the <a href="#root/_help_wX4HbRucYSDD">demo notes</a>.</p>
|
||||
<p>By adding <code>weight</code> as a <a href="#root/_help_OFXdgB2nNk1F">promoted attribute</a> in
|
||||
the <a href="#root/_help_KC1HB96bqqHX">template</a> from which <a href="#root/_help_l0tKav7yLHGF">day notes</a> are
|
||||
created, you can aggregate the data and plot weight change over time.</p>
|
||||
<h2>Implementation</h2>
|
||||
<p>The <code>Weight Tracker</code> note in the screenshot above is of the type <code>Render Note</code>.
|
||||
That type of note doesn't have any useful content itself. Instead it is
|
||||
a placeholder where a <a href="../../Scripting.html">script</a> can render
|
||||
a placeholder where a <a href="#root/_help_CdNpE2pqjmI6">script</a> can render
|
||||
its output.</p>
|
||||
<p>Scripts for <code>Render Notes</code> are defined in a <a href="../Attributes.html">relation</a> called <code>~renderNote</code>.
|
||||
<p>Scripts for <code>Render Notes</code> are defined in a <a href="#root/_help_zEY4DaJG4YT5">relation</a> called <code>~renderNote</code>.
|
||||
In this example, it's the <code>Weight Tracker</code>'s child <code>Implementation</code>.
|
||||
The Implementation consists of two <a href="../../Note%20Types/Code.html">code notes</a> that
|
||||
The Implementation consists of two <a href="#root/_help_6f9hih2hXXZk">code notes</a> that
|
||||
contain some HTML and JavaScript respectively, which load all the notes
|
||||
with a <code>weight</code> attribute and display their values in a chart.</p>
|
||||
<p>To actually render the chart, we're using a third party library called
|
||||
@ -36,7 +36,7 @@
|
||||
href="https://www.chartjs.org/">chart.js</a>which is imported as an attachment, since it's not built into
|
||||
Trilium.</p>
|
||||
<h3>Code</h3>
|
||||
<p>Here's the content of the script which is placed in a <a href="../../Note%20Types/Code.html">code note</a> of
|
||||
<p>Here's the content of the script which is placed in a <a href="#root/_help_6f9hih2hXXZk">code note</a> of
|
||||
type <code>JS Frontend</code>:</p><pre><code class="language-text-x-trilium-auto">async function getChartData() {
|
||||
const days = await api.runOnBackend(async () => {
|
||||
const notes = api.getNotesWithLabel('weight');
|
||||
|
@ -13,122 +13,50 @@
|
||||
<h1 data-trilium-h1>Attributes</h1>
|
||||
|
||||
<div class="ck-content">
|
||||
<figure class="image">
|
||||
<img style="aspect-ratio:1071/146;" src="Attributes_image.png" width="1071"
|
||||
height="146">
|
||||
</figure>
|
||||
<p>In Trilium, attributes are key-value pairs assigned to notes, providing
|
||||
additional metadata or functionality. There are two primary types of attributes:</p>
|
||||
<ol>
|
||||
<li><strong>Labels</strong>: Simple key-value text records</li>
|
||||
<li><strong>Relations</strong>: Named links to other notes</li>
|
||||
<li>
|
||||
<p><a class="reference-link" href="#root/_help_HI6GBBIduIgv">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.</p>
|
||||
<p>For more information, including predefined labels, see <a class="reference-link"
|
||||
href="#root/_help_HI6GBBIduIgv">Labels</a>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a class="reference-link" href="#root/_help_Cq5X6iKQop6R">Relations</a> define
|
||||
connections between notes, similar to links. These can be used for metadata
|
||||
and scripting purposes.</p>
|
||||
<p>For more information, including a list of predefined relations, see
|
||||
<a
|
||||
class="reference-link" href="#root/_help_Cq5X6iKQop6R">Relations</a>.</p>
|
||||
</li>
|
||||
</ol>
|
||||
<p>These attributes play a crucial role in organizing, categorising, and
|
||||
enhancing the functionality of notes.</p>
|
||||
<p>
|
||||
<img src="Attributes_image.png">
|
||||
</p>
|
||||
<h2>Labels</h2>
|
||||
<p>Labels in Trilium can be used for a variety of purposes:</p>
|
||||
<ul>
|
||||
<li><strong>Metadata</strong>: Assign labels with optional values for categorization,
|
||||
such as <code>#year=1999</code>, <code>#genre="sci-fi"</code>, or <code>#author="Neal Stephenson"</code>
|
||||
</li>
|
||||
<li><strong>Configuration</strong>: Labels can configure advanced features
|
||||
or settings</li>
|
||||
<li><strong>Scripts and Plugins</strong>: Used to tag notes with special metadata,
|
||||
such as the "weight" attribute in the <a class="reference-link" href="Advanced%20Showcases/Weight%20Tracker.html">Weight Tracker</a>.</li>
|
||||
</ul>
|
||||
<p>Labels are also searchable, enhancing note retrieval.</p>
|
||||
<h3>Common Labels for Advanced Configuration</h3>
|
||||
<ul>
|
||||
<li><code>disableVersioning</code>: Disables automatic versioning, ideal for
|
||||
large, unimportant notes like script libraries</li>
|
||||
<li><code>versioningLimit</code>: Used to limit the number of revisions for
|
||||
a single note</li>
|
||||
<li><code>calendarRoot</code>: Marks the note as the root for <a href="Advanced%20Showcases/Day%20Notes.html">day notes</a>.
|
||||
Only one note should carry this label</li>
|
||||
<li><code>archived</code>: Hides notes from default search results and dialogs</li>
|
||||
<li><code>excludeFromExport</code>: Excludes notes and their subtrees from
|
||||
export operations</li>
|
||||
<li><code>run</code>: Specifies events to trigger scripts (e.g., <code>frontendStartup</code>, <code>hourly</code>)</li>
|
||||
<li><code>runAtHour</code>: Defines specific hours for scripts to run, used
|
||||
with <code>#run=hourly</code>
|
||||
</li>
|
||||
<li><code>disableInclusion</code>: Prevents a script from being included in
|
||||
parent script executions</li>
|
||||
<li><code>sorted</code>: Automatically sorts child notes alphabetically by
|
||||
title</li>
|
||||
<li><code>top</code>: Keeps the note at the top of its parent's list, useful
|
||||
with <code>sorted</code>
|
||||
</li>
|
||||
<li><code>hidePromotedAttributes</code>: Hides certain attributes in the note's
|
||||
display</li>
|
||||
<li><code>readOnly</code>: Sets the note to read-only mode, applicable to
|
||||
text and code notes</li>
|
||||
<li><code>autoReadOnlyDisabled</code>: Disables automatic read-only mode for
|
||||
large notes</li>
|
||||
<li><code>appCss</code>: Marks CSS notes used to modify Trilium’s appearance</li>
|
||||
<li><code>appTheme</code>: Marks full CSS themes available in Trilium's options</li>
|
||||
<li><code>cssClass</code>: Adds a CSS class to the note's representation in
|
||||
the tree</li>
|
||||
<li><code>iconClass</code>: 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.html">Note Icons</a>.</li>
|
||||
<li><code>pageSize</code>: Specifies the number of items per page in note
|
||||
listings</li>
|
||||
<li><code>customRequestHandler</code> <strong>and</strong> <code>customResourceProvider</code>:
|
||||
Refer to <a class="reference-link" href="Custom%20Request%20Handler.html">Custom Request Handler</a>
|
||||
</li>
|
||||
<li><code>widget</code>: Marks a note as a custom widget, added to Trilium's
|
||||
component tree</li>
|
||||
<li><code>workspace</code> <strong>and related attributes</strong>: See
|
||||
<a
|
||||
class="reference-link" href="../Basic%20Concepts%20and%20Features/Navigation/Workspace.html">Workspace</a> for more details</li>
|
||||
<li><code>searchHome</code>: Specifies the parent for new search notes</li>
|
||||
<li><code>inbox</code>: Designates a default location for new notes created
|
||||
via the sidebar</li>
|
||||
<li><code>sqlConsoleHome</code>: Default location for SQL console notes</li>
|
||||
<li><code>bookmarked</code> <strong>and</strong> <code>bookmarkFolder</code>:
|
||||
See <a class="reference-link" href="../Basic%20Concepts%20and%20Features/Navigation/Bookmarks.html">Bookmarks</a>
|
||||
</li>
|
||||
<li><code>share:[…]</code>: See <a class="reference-link" href="Sharing.html">Sharing</a>
|
||||
</li>
|
||||
<li><code>keyboardShortcut</code>: Assigns a keyboard shortcut to open the
|
||||
note</li>
|
||||
<li><code>displayRelations</code> <strong>and</strong> <code>hideRelations</code>:
|
||||
Manages the display of note relations</li>
|
||||
<li><code>titleTemplate</code>: See <a class="reference-link" href="Default%20Note%20Title.html">Default Note Title</a>
|
||||
</li>
|
||||
<li><code>template</code>: Makes the note available as a template</li>
|
||||
<li><code>toc</code>: Controls the visibility of the table of contents</li>
|
||||
<li><code>color</code>: Defines the color of the note in the tree and links</li>
|
||||
<li><code>hideChildrenOverview</code>: Hides child notes in the parent note's
|
||||
editor</li>
|
||||
<li><code>viewType</code>: Sets the view of child notes (grid or list)</li>
|
||||
</ul>
|
||||
<h2>Relations</h2>
|
||||
<p>Relations define connections between notes, similar to links.</p>
|
||||
<h3>Uses</h3>
|
||||
<ul>
|
||||
<li><strong>Metadata Relationships</strong>: For example, linking a book note
|
||||
to an author note</li>
|
||||
<li><strong>Scripting</strong>: Attaching scripts to events or conditions
|
||||
related to the note</li>
|
||||
</ul>
|
||||
<h3>Common Relations</h3>
|
||||
<ul>
|
||||
<li><strong>Event-based Relations</strong>: Such as <code>runOnNoteCreation</code> or <code>runOnNoteChange</code>,
|
||||
which trigger scripts on specific actions</li>
|
||||
<li><strong>Other Relations</strong>: Include <code>template</code>, <code>renderNote</code>, <code>widget</code>,
|
||||
and sharing-related relations</li>
|
||||
</ul>
|
||||
<h2>Viewing the list of attributes</h2>
|
||||
<p>Both the labels and relations for the current note are displayed in the <em>Owned Attributes</em> section
|
||||
of the <a class="reference-link" href="#root/_help_BlN9DFI679QC">Ribbon</a>,
|
||||
where they can be viewed and edited. Inherited attributes are displayed
|
||||
in the <em>Inherited Attributes</em> section of the ribbon, where they can
|
||||
only be viewed.</p>
|
||||
<p>In the list of attributes, labels are prefixed with the <code>#</code> character
|
||||
whereas relations are prefixed with the <code>~</code> character.</p>
|
||||
<h2>Multiplicity</h2>
|
||||
<p>Attributes in Trilium can be "multivalued", meaning multiple attributes
|
||||
with the same name can coexist.</p>
|
||||
<p>Attributes in Trilium can be "multi-valued", meaning multiple attributes
|
||||
with the same name can co-exist.</p>
|
||||
<h2>Attribute Definitions and Promoted Attributes</h2>
|
||||
<p>Special labels create "label/attribute" definitions, enhancing the organization
|
||||
and management of attributes. For more details, see <a class="reference-link"
|
||||
href="Attributes/Promoted%20Attributes.html">Promoted Attributes</a>.</p>
|
||||
href="#root/_help_OFXdgB2nNk1F">Promoted Attributes</a>.</p>
|
||||
<h2>Attribute Inheritance</h2>
|
||||
<p>Trilium supports attribute inheritance, allowing child notes to inherit
|
||||
attributes from their parents. For more information, see <a class="reference-link"
|
||||
href="Attributes/Attribute%20Inheritance.html">Attribute Inheritance</a>.</p>
|
||||
href="#root/_help_bwZpz2ajCEwO">Attribute Inheritance</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
@ -13,35 +13,53 @@
|
||||
<h1 data-trilium-h1>Attribute Inheritance</h1>
|
||||
|
||||
<div class="ck-content">
|
||||
<h2>1. Standard Inheritance</h2>
|
||||
<p>Inheritance refers to the process of having a <a href="#root/_help_HI6GBBIduIgv">label</a> or
|
||||
a <a href="#root/_help_Cq5X6iKQop6R">relation</a> shared across multiple
|
||||
notes, generally in parent-child relations (or anywhere if using templates).</p>
|
||||
<h2>Standard Inheritance</h2>
|
||||
<p>In Trilium, attributes can be automatically inherited by child notes if
|
||||
they have the <code>isInheritable</code> flag set to <code>true</code>. This
|
||||
means the attribute (a key-value pair) is applied to the note and all its
|
||||
descendants.</p>
|
||||
<h3>Example Use Case</h3>
|
||||
<p>The <code>archived</code> label can be set to be inheritable, allowing you
|
||||
to hide a whole subtree of notes from searches and other dialogs by applying
|
||||
this label at the top level.</p>
|
||||
<h2>2. Copying Inheritance</h2>
|
||||
<p>To make an attribute inheritable, simply use the visual editor for
|
||||
<a
|
||||
class="reference-link" href="#root/_help_HI6GBBIduIgv">Labels</a> or <a class="reference-link" href="#root/_help_Cq5X6iKQop6R">Relations</a>.
|
||||
Alternatively, the attribute can be manually defined where <code>#myLabel=value</code> becomes <code>#myLabel(inheritable)=value</code> when
|
||||
inheritable.</p>
|
||||
<p>As an example, the <code>archived</code> label can be set to be inheritable,
|
||||
allowing you to hide a whole subtree of notes from searches and other dialogs
|
||||
by applying this label at the top level.</p>
|
||||
<p>Standard inheritance forces all the notes that are children (and sub-children)
|
||||
of a note to have that particular label or relation. If there is a need
|
||||
to have some notes not inherit one of the labels, then <em>copying inheritance</em> or <em>template inheritance</em> needs
|
||||
to be used instead.</p>
|
||||
<h2>Copying Inheritance</h2>
|
||||
<p>Copying inheritance differs from standard inheritance by using a <code>child:</code> prefix
|
||||
in the attribute name. This prefix causes new child notes to automatically
|
||||
receive specific attributes from the parent note. These attributes are
|
||||
independent of the parent and will persist even if the note is moved elsewhere.</p>
|
||||
<h3>How to Use</h3>
|
||||
<ul>
|
||||
<li><strong>Syntax:</strong> <code>#child:attributeName</code>
|
||||
</li>
|
||||
<li><strong>Chained Inheritance:</strong> You can chain this inheritance, such
|
||||
as <code>#child:child:attributeName</code>, where each child down the hierarchy
|
||||
receives the appropriate attribute.</li>
|
||||
</ul>
|
||||
<h3>Example</h3>
|
||||
<p>If a parent note has the label <code>#child:exampleAttribute</code>, all
|
||||
newly created child notes will inherit the <code>#exampleAttribute</code> label.
|
||||
newly created child notes (one level deep) will inherit the <code>#exampleAttribute</code> label.
|
||||
This can be useful for setting default properties for notes in a specific
|
||||
section.</p>
|
||||
<h2>3. Template Inheritance</h2>
|
||||
<p>Attributes can also be inherited from <a href="../Templates.html">templates</a>.
|
||||
<p>Similarly, for relations use <code>~child:myRelation</code>.</p>
|
||||
<p>Due to the way it's designed, copying inheritance cannot be used to cascade
|
||||
infinitely within a hierarchy. For that use case, consider using either
|
||||
standard inheritance or templates.</p>
|
||||
<h3>Chained inheritance</h3>
|
||||
<p>It is possible to define labels across multiple levels of depth. For example, <code>#child:child:child:foo</code> applied
|
||||
to a root note would create:</p>
|
||||
<ul>
|
||||
<li><code>#child:child:foo</code> on the first-level children.</li>
|
||||
<li><code>#child:foo</code> on the second-level children.</li>
|
||||
<li><code>#foo</code> on the third-level children.</li>
|
||||
</ul>
|
||||
<p>Similarly, use <code>~child:child:child:foo</code> if dealing with relations.</p>
|
||||
<p>Do note that same as simple copying inheritance, the changes will not
|
||||
apply retroactively to existing notes in the hierarchy, it will only apply
|
||||
to the newly created notes.</p>
|
||||
<h2>Template Inheritance</h2>
|
||||
<p>Attributes can also be inherited from <a class="reference-link" href="#root/_help_KC1HB96bqqHX">Templates</a>.
|
||||
When a new note is created using a template, it inherits the attributes
|
||||
defined in that template. This is particularly useful for maintaining consistency
|
||||
across notes that follow a similar structure or function.</p>
|
||||
|
405
src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes/Labels.html
generated
Normal file
@ -0,0 +1,405 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
<base target="_parent">
|
||||
<title data-trilium-title>Labels</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="content">
|
||||
<h1 data-trilium-h1>Labels</h1>
|
||||
|
||||
<div class="ck-content">
|
||||
<p>A label is an <a href="#root/_help_zEY4DaJG4YT5">attribute</a> of a note
|
||||
which has a name and optionally a value.</p>
|
||||
<h2>Common use cases</h2>
|
||||
<ul>
|
||||
<li><strong>Metadata for personal use</strong>: Assign labels with optional
|
||||
values for categorization, such as <code>#year=1999</code>, <code>#genre="sci-fi"</code>,
|
||||
or <code>#author="Neal Stephenson"</code>. This can be combined with
|
||||
<a
|
||||
class="reference-link" href="#root/_help_OFXdgB2nNk1F">Promoted Attributes</a> to make their display more user-friendly.</li>
|
||||
<li><strong>Configuration</strong>: Labels can configure advanced features
|
||||
or settings (see reference below).</li>
|
||||
<li><strong>Scripts and Plugins</strong>: Used to tag notes with special metadata,
|
||||
such as the "weight" attribute in the <a class="reference-link" href="#root/_help_R7abl2fc6Mxi">Weight Tracker</a>.</li>
|
||||
</ul>
|
||||
<h2>Creating a label using the visual editor</h2>
|
||||
<ol>
|
||||
<li>Go to the <em>Owned Attributes</em> section in the <a class="reference-link"
|
||||
href="#root/_help_BlN9DFI679QC">Ribbon</a>.</li>
|
||||
<li>Press the + button (<em>Add new attribute</em>) to the right.</li>
|
||||
<li>Select <em>Add new label</em> for the relation.</li>
|
||||
</ol>
|
||||
<aside class="admonition tip">
|
||||
<p>If you prefer keyboard shortcuts, press <kbd>Alt</kbd>+<kbd>L</kbd> while
|
||||
focused on a note or in the <em>Owned Attributes</em> section to display
|
||||
the visual editor.</p>
|
||||
</aside>
|
||||
<p>While in the visual editor:</p>
|
||||
<ul>
|
||||
<li>Set the desired name</li>
|
||||
<li>Optionally, set the value of the label. Labels can exist without a value.</li>
|
||||
<li>Check <em>Inheritable</em> if the label should be inherited by the child
|
||||
notes as well. See <a class="reference-link" href="#root/_help_bwZpz2ajCEwO">Attribute Inheritance</a> for
|
||||
more information.</li>
|
||||
</ul>
|
||||
<h2>Creating a label manually</h2>
|
||||
<p>In the <em>Owned Attributes</em> section in the <a class="reference-link"
|
||||
href="#root/_help_BlN9DFI679QC">Ribbon</a>:</p>
|
||||
<ul>
|
||||
<li>To create a label called <code>myLabel</code> with no value, simply type <code>#myLabel</code>.</li>
|
||||
<li>To create a label called <code>myLabel</code> with a value <code>value</code>,
|
||||
simply type <code>#myLabel=value</code>.</li>
|
||||
<li>If the value contains spaces, then the text must be quoted: <code>#myLabel="Hello world"</code>.</li>
|
||||
<li>If the string contains quotes (regardless of whether it has spaces), then
|
||||
the text must be quoted with apostrophes instead: <code>#myLabel='Hello "world"'</code>.</li>
|
||||
<li>To create an inheritable label called <code>myLabel</code>, simply write <code>#myLabel(inheritable)</code> for
|
||||
no value or <code>#myLabel(inheritable)=value</code> if there is a value.</li>
|
||||
</ul>
|
||||
<h2>Predefined labels</h2>
|
||||
<p>This is a list of labels that Trilium natively supports.</p>
|
||||
<aside class="admonition tip">
|
||||
<p>Some labels presented here end with a <code>*</code>. That means that there
|
||||
are multiple labels with the same prefix, consult the specific page linked
|
||||
in the description of that label for more information.</p>
|
||||
</aside>
|
||||
<figure class="table" style="width:100%;">
|
||||
<table class="ck-table-resized">
|
||||
<colgroup>
|
||||
<col style="width:33.82%;">
|
||||
<col style="width:66.18%;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Label</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>disableVersioning</code>
|
||||
</td>
|
||||
<td>Disables automatic creation of <a class="reference-link" href="#root/_help_vZWERwf8U3nx">Note Revisions</a> for
|
||||
a particular note. Useful for e.g. large, but unimportant notes - e.g.
|
||||
large JS libraries used for scripting.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>versioningLimit</code>
|
||||
</td>
|
||||
<td>Limits the maximum number of <a class="reference-link" href="#root/_help_vZWERwf8U3nx">Note Revisions</a> for
|
||||
a particular note, overriding the global settings.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>calendarRoot</code>
|
||||
</td>
|
||||
<td>Marks the note which should be used as root for <a class="reference-link"
|
||||
href="#root/_help_l0tKav7yLHGF">Day Notes</a>. Only one should be marked
|
||||
as such.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>archived</code>
|
||||
</td>
|
||||
<td>Hides notes from default search results and dialogs. Archived notes can
|
||||
optionally be hidden in the <a class="reference-link" href="#root/_help_oPVyFC7WL2Lp">Note Tree</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>excludeFromExport</code>
|
||||
</td>
|
||||
<td>Excludes this note and its children when exporting.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>run</code>, <code>runOnInstance</code>, <code>runAtHour</code>
|
||||
</td>
|
||||
<td>See <a class="reference-link" href="#root/_help_GPERMystNGTB">Events</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>disableInclusion</code>
|
||||
</td>
|
||||
<td>Scripts with this label won't be included into parent script execution.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>sorted</code>
|
||||
</td>
|
||||
<td>
|
||||
<p>Keeps child notes sorted by title alphabetically.</p>
|
||||
<p>When given a value, it will sort by the value of another label instead.
|
||||
If one of the child notes doesn't have the specified label, the title will
|
||||
be used for them instead.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>sortDirection</code>
|
||||
</td>
|
||||
<td>
|
||||
<p>If <code>sorted</code> is applied, specifies the direction of the sort:</p>
|
||||
<ul>
|
||||
<li><code>ASC</code>, ascending (default)</li>
|
||||
<li><code>DESC</code>, descending</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>sortFoldersFirst</code>
|
||||
</td>
|
||||
<td>If <code>sorted</code> is applied, folders (notes with children) will be
|
||||
sorted as a group at the top, and the rest will be sorted.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>top</code>
|
||||
</td>
|
||||
<td>If <code>sorted</code> is applied to the parent note, keeps given note on
|
||||
top in its parent.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>hidePromotedAttributes</code>
|
||||
</td>
|
||||
<td>Hide <a class="reference-link" href="#root/_help_OFXdgB2nNk1F">Promoted Attributes</a> on
|
||||
this note. Generally useful when defining inherited attributes, but the
|
||||
parent note doesn't need them.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>readOnly</code>
|
||||
</td>
|
||||
<td>Marks a note to be always be <a href="#root/_help_CoFPLs3dRlXc">read-only</a>,
|
||||
if it's a supported note (text, code, mermaid).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>autoReadOnlyDisabled</code>
|
||||
</td>
|
||||
<td>Disables automatic <a href="#root/_help_CoFPLs3dRlXc">read-only mode</a> for
|
||||
the given note.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>appCss</code>
|
||||
</td>
|
||||
<td>Marks CSS notes which are loaded into the Trilium application and can
|
||||
thus be used to modify Trilium's looks. See <a class="reference-link"
|
||||
href="#root/_help_AlhDUqhENtH7">Custom app-wide CSS</a> for more info.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>appTheme</code>
|
||||
</td>
|
||||
<td>Marks CSS notes which are full Trilium themes and are thus available in
|
||||
Trilium options. See <a class="reference-link" href="#root/_help_pKK96zzmvBGf">Theme development</a> for
|
||||
more information.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>appThemeBase</code>
|
||||
</td>
|
||||
<td>Set to <code>next</code>, <code>next-light</code>, or <code>next-dark</code> to
|
||||
use the corresponding TriliumNext theme (auto, light or dark) as the base
|
||||
for a custom theme, instead of the legacy one. See <a class="reference-link"
|
||||
href="#root/_help_WFGzWeUK6arS">Customize the Next theme</a> for more
|
||||
information.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>cssClass</code>
|
||||
</td>
|
||||
<td>Value of this label is then added as CSS class to the node representing
|
||||
given note in the <a class="reference-link" href="#root/_help_oPVyFC7WL2Lp">Note Tree</a>.
|
||||
This can be useful for advanced theming. Can be used in template notes.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>iconClass</code>
|
||||
</td>
|
||||
<td>value of this label is added as a CSS class to the icon on the tree which
|
||||
can help visually distinguish the notes in the tree. Example might be bx
|
||||
bx-home - icons are taken from boxicons. Can be used in template notes.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>pageSize</code>
|
||||
</td>
|
||||
<td>Specifies the number of items per page in <a class="reference-link"
|
||||
href="#root/_help_0ESUbbAxVnoK">Note List</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>customRequestHandler</code>
|
||||
</td>
|
||||
<td>See <a class="reference-link" href="#root/_help_J5Ex1ZrMbyJ6">Custom Request Handler</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>customResourceProvider</code>
|
||||
</td>
|
||||
<td>See <a class="reference-link" href="#root/_help_d3fAXQ2diepH">Custom Resource Providers</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>widget</code>
|
||||
</td>
|
||||
<td>Marks this note as a custom widget which will be added to the Trilium
|
||||
component tree. See <a class="reference-link" href="#root/_help_MgibgPcfeuGz">Custom Widgets</a> for
|
||||
more information.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>searchHome</code>
|
||||
</td>
|
||||
<td>New search notes will be created as children of this note (see
|
||||
<a
|
||||
class="reference-link" href="#root/_help_m523cpzocqaD">Saved Search</a>).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>workspace</code> and related attributes</td>
|
||||
<td>See <a class="reference-link" href="#root/_help_9sRHySam5fXb">Workspaces</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>inbox</code>
|
||||
</td>
|
||||
<td>default inbox location for new notes - when you create a note using <em>new note</em> button
|
||||
in the sidebar, notes will be created as child notes in the note marked
|
||||
as with <code>#inbox</code> label.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>sqlConsoleHome</code>
|
||||
</td>
|
||||
<td>Default location of <a class="reference-link" href="#root/_hidden/_help/_help_tC7s2alapj8V/_help_wX4HbRucYSDD/_help_oyIAJ9PvvwHX/_help__help_YKWqdJhzi2VY">SQL Console</a> notes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>bookmarked</code>
|
||||
</td>
|
||||
<td>Indicates this note is a <a href="#root/_help_u3YFHC9tQlpm">bookmark</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>bookmarkFolder</code>
|
||||
</td>
|
||||
<td>Note with this label will appear in bookmarks as folder (allowing access
|
||||
to its children). See <a class="reference-link" href="#root/_help_u3YFHC9tQlpm">Bookmarks</a> for
|
||||
more information.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>share*</code>
|
||||
</td>
|
||||
<td>See the attribute reference in <a class="reference-link" href="#root/_help_R9pX4DGra2Vt">Sharing</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>displayRelations</code>, <code>hideRelations</code>
|
||||
</td>
|
||||
<td>Comma delimited names of relations which should be displayed/hidden in
|
||||
a <a class="reference-link" href="#root/_help_iRwzGnHPzonm">Relation Map</a> (both
|
||||
the note type and the <a class="reference-link" href="#root/_help_BCkXAVs63Ttv">Note Map (Link map, Tree map)</a> general
|
||||
functionality).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>titleTemplate</code>
|
||||
</td>
|
||||
<td>
|
||||
<p>Default title of notes created as children of this note. This value is
|
||||
evaluated as a JavaScript string and thus can be enriched with dynamic
|
||||
content via the injected <code>now</code> and <code>parentNote</code> variables.</p>
|
||||
<p>Examples:</p>
|
||||
<ul>
|
||||
<li><code>${parentNote.getLabel('authorName')}'s literary works</code>
|
||||
</li>
|
||||
<li><code>Log for ${now.format('YYYY-MM-DD HH:mm:ss')}</code>
|
||||
</li>
|
||||
<li>to mirror the parent's template.</li>
|
||||
</ul>
|
||||
<p>See <a class="reference-link" href="#root/_help_47ZrP6FNuoG8">Default Note Title</a> for
|
||||
more info.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>template</code>
|
||||
</td>
|
||||
<td>This note will appear in the selection of available template when creating
|
||||
new note. See <a class="reference-link" href="#root/_help_KC1HB96bqqHX">Templates</a> for
|
||||
more information.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>toc</code>
|
||||
</td>
|
||||
<td>Controls the display of the <a class="reference-link" href="#root/_help_BFvAtE74rbP6">Table of contents</a> for
|
||||
a given note. <code>#toc</code> or <code>#toc=show</code> to always display
|
||||
the table of contents, <code>#toc=false</code> to always hide it.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>color</code>
|
||||
</td>
|
||||
<td>defines color of the note in note tree, links etc. Use any valid CSS color
|
||||
value like 'red' or #a13d5f</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>keyboardShortcut</code>
|
||||
</td>
|
||||
<td>Defines a keyboard shortcut which will immediately jump to this note.
|
||||
Example: 'ctrl+alt+e'. Requires frontend reload for the change to take
|
||||
effect.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>keepCurrentHoisting</code>
|
||||
</td>
|
||||
<td>Opening this link won't change hoisting even if the note is not displayable
|
||||
in the current hoisted subtree.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>executeButton</code>
|
||||
</td>
|
||||
<td>Title of the button which will execute the current code note</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>executeDescription</code>
|
||||
</td>
|
||||
<td>Longer description of the current code note displayed together with the
|
||||
execute button</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>excludeFromNoteMap</code>
|
||||
</td>
|
||||
<td>Notes with this label will be hidden from the <a class="reference-link"
|
||||
href="#root/_help_bdUJEHsAPYQR">Note Map</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>newNotesOnTop</code>
|
||||
</td>
|
||||
<td>New notes will be created at the top of the parent note, not on the bottom.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>hideHighlightWidget</code>
|
||||
</td>
|
||||
<td>Hides the <a class="reference-link" href="#root/_help_AxshuNRegLAv">Highlights list</a> widget</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>hideChildrenOverview</code>
|
||||
</td>
|
||||
<td>Hides the <a class="reference-link" href="#root/_help_0ESUbbAxVnoK">Note List</a> for
|
||||
that particular note.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>printLandscape</code>
|
||||
</td>
|
||||
<td>When exporting to PDF, changes the orientation of the page to landscape
|
||||
instead of portrait.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>printPageSize</code>
|
||||
</td>
|
||||
<td>When exporting to PDF, changes the size of the page. Supported values: <code>A0</code>, <code>A1</code>, <code>A2</code>, <code>A3</code>, <code>A4</code>, <code>A5</code>, <code>A6</code>, <code>Legal</code>, <code>Letter</code>, <code>Tabloid</code>, <code>Ledger</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>geolocation</code>
|
||||
</td>
|
||||
<td>Indicates the latitude and longitude of a note, to be displayed in a
|
||||
<a
|
||||
class="reference-link" href="#root/_help_81SGnPGMk7Xc">Geo Map</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>calendar:*</code>
|
||||
</td>
|
||||
<td>Defines specific options for the <a class="reference-link" href="#root/_help_xWbu3jpNWapp">Calendar View</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>viewType</code>
|
||||
</td>
|
||||
<td>Sets the view of child notes (e.g. grid or list). See <a class="reference-link"
|
||||
href="#root/_help_0ESUbbAxVnoK">Note List</a> for more information.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</figure>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -13,7 +13,7 @@
|
||||
<h1 data-trilium-h1>Promoted Attributes</h1>
|
||||
|
||||
<div class="ck-content">
|
||||
<p>Promoted attributes are <a href="../Attributes.html">attributes</a> which
|
||||
<p>Promoted attributes are <a href="#root/_help_zEY4DaJG4YT5">attributes</a> which
|
||||
are considered important and thus are "promoted" onto the main note UI.
|
||||
See example below:</p>
|
||||
<p>
|
||||
@ -37,7 +37,7 @@
|
||||
<p>You can notice tag attribute definition. These "definition" attributes
|
||||
define how the "value" attributes should behave.</p>
|
||||
<p>So there's one attribute for value and one for definition. But notice
|
||||
how definition attribute is <a href="Attribute%20Inheritance.html">Inheritable</a>,
|
||||
how definition attribute is <a href="#root/_help_bwZpz2ajCEwO">Inheritable</a>,
|
||||
meaning that it's also applied to all descendant note. So in a way, this
|
||||
definition is used for the whole subtree while "value" attributes are applied
|
||||
only for this note.</p>
|
||||
|
159
src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes/Relations.html
generated
Normal file
@ -0,0 +1,159 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
<base target="_parent">
|
||||
<title data-trilium-title>Relations</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="content">
|
||||
<h1 data-trilium-h1>Relations</h1>
|
||||
|
||||
<div class="ck-content">
|
||||
<p>A relation is similar to a <a href="#root/_help_HI6GBBIduIgv">label</a>,
|
||||
but instead of having a text value it refers to another note.</p>
|
||||
<h2>Common use cases</h2>
|
||||
<ul>
|
||||
<li><strong>Metadata Relationships for personal use</strong>: For example,
|
||||
linking a book note to an author note.
|
||||
<br>This can be combined with <a class="reference-link" href="#root/_help_OFXdgB2nNk1F">Promoted Attributes</a> to
|
||||
make their display more user-friendly.</li>
|
||||
<li><strong>Configuration</strong>: For configuring some notes such as
|
||||
<a
|
||||
class="reference-link" href="#root/_help_HcABDtFCkbFN">Render Note</a>, or configuring <a class="reference-link" href="#root/_help_R9pX4DGra2Vt">Sharing</a> or
|
||||
<a
|
||||
class="reference-link" href="#root/_help_KC1HB96bqqHX">Templates</a> (see the list below).</li>
|
||||
<li><strong>Scripting</strong>: Attaching scripts to events or conditions
|
||||
related to the note.</li>
|
||||
</ul>
|
||||
<h2>Creating a relation using the visual editor</h2>
|
||||
<ol>
|
||||
<li>Go to the <em>Owned Attributes</em> section in the <a class="reference-link"
|
||||
href="#root/_help_BlN9DFI679QC">Ribbon</a>.</li>
|
||||
<li>Press the + button (<em>Add new attribute</em>) to the right.</li>
|
||||
<li>Select <em>Add new relation</em> for the relation.</li>
|
||||
</ol>
|
||||
<aside class="admonition tip">
|
||||
<p>If you prefer keyboard shortcuts, press <kbd>Alt</kbd>+<kbd>L</kbd> while
|
||||
focused on a note or in the <em>Owned Attributes</em> section to display
|
||||
the visual editor.</p>
|
||||
</aside>
|
||||
<p>While in the visual editor:</p>
|
||||
<ul>
|
||||
<li>Set the desired name</li>
|
||||
<li>Set the Target note (the note to point to). Unlike labels, relations cannot
|
||||
exist with a target note.</li>
|
||||
<li>Check <em>Inheritable</em> if the label should be inherited by the child
|
||||
notes as well. See <a class="reference-link" href="#root/_help_bwZpz2ajCEwO">Attribute Inheritance</a> for
|
||||
more information.</li>
|
||||
</ul>
|
||||
<h2>Creating a relation manually</h2>
|
||||
<p>In the <em>Owned Attributes</em> section in the <a class="reference-link"
|
||||
href="#root/_help_BlN9DFI679QC">Ribbon</a>:</p>
|
||||
<ul>
|
||||
<li>To create a relation called <code>myRelation</code>:
|
||||
<ul>
|
||||
<li>First type <code>~myRelation=@</code> .</li>
|
||||
<li>After this, an autocompletion box should appear.</li>
|
||||
<li>Type the title of the note to point to and press <kbd>Enter</kbd> to confirm
|
||||
(or click the desired note).</li>
|
||||
<li>Alternatively copy a note from the <a class="reference-link" href="#root/_help_oPVyFC7WL2Lp">Note Tree</a> and
|
||||
paste it after the <code>=</code> sign (without the <code>@</code> , in this
|
||||
case).</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>To create an inheritable relation, follow the same steps as previously
|
||||
described but instead of <code>~myRelation</code> write <code>~myRelation(inheritable)</code>.</li>
|
||||
</ul>
|
||||
<h2>Predefined relations</h2>
|
||||
<p>These relations are supported and used internally by Trilium.</p>
|
||||
<aside
|
||||
class="admonition tip">
|
||||
<p>Some relations presented here end with a <code>*</code>. That means that
|
||||
there are multiple relations with the same prefix, consult the specific
|
||||
page linked in the description of that relation for more information.</p>
|
||||
</aside>
|
||||
<figure class="table" style="width:100%;">
|
||||
<table class="ck-table-resized">
|
||||
<colgroup>
|
||||
<col style="width:33.95%;">
|
||||
<col style="width:66.05%;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Label</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>runOn*</code>
|
||||
</td>
|
||||
<td>See <a class="reference-link" href="#root/_help_GPERMystNGTB">Events</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>template</code>
|
||||
</td>
|
||||
<td>note's attributes will be inherited even without a parent-child relationship,
|
||||
note's content and subtree will be added to instance notes if empty. See
|
||||
documentation for details.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>inherit</code>
|
||||
</td>
|
||||
<td>note's attributes will be inherited even without a parent-child relationship.
|
||||
See <a class="reference-link" href="#root/_help_KC1HB96bqqHX">Templates</a> for
|
||||
a similar concept. See <a class="reference-link" href="#root/_help_bwZpz2ajCEwO">Attribute Inheritance</a> in
|
||||
the documentation.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>renderNote</code>
|
||||
</td>
|
||||
<td>notes of type <a class="reference-link" href="#root/_help_HcABDtFCkbFN">Render Note</a> will
|
||||
be rendered using a code note (HTML or script) and it is necessary to point
|
||||
using this relation to which note should be rendered</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>widget_relation</code>
|
||||
</td>
|
||||
<td>target of this relation will be executed and rendered as a widget in the
|
||||
sidebar</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>shareCss</code>
|
||||
</td>
|
||||
<td>CSS note which will be injected into the share page. CSS note must be
|
||||
in the shared sub-tree as well. Consider using <code>share_hidden_from_tree</code> and <code>share_omit_default_css</code> as
|
||||
well.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>shareJs</code>
|
||||
</td>
|
||||
<td>JavaScript note which will be injected into the share page. JS note must
|
||||
be in the shared sub-tree as well. Consider using <code>share_hidden_from_tree</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>shareTemplate</code>
|
||||
</td>
|
||||
<td>Embedded JavaScript note that will be used as the template for displaying
|
||||
the shared note. Falls back to the default template. Consider using <code>share_hidden_from_tree</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>shareFavicon</code>
|
||||
</td>
|
||||
<td>Favicon note to be set in the shared page. Typically you want to set it
|
||||
to share root and make it inheritable. Favicon note must be in the shared
|
||||
sub-tree as well. Consider using <code>share_hidden_from_tree</code>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</figure>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 32 KiB |
189
src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Bulk Actions.html
generated
Normal file
@ -0,0 +1,189 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="../../style.css">
|
||||
<base target="_parent">
|
||||
<title data-trilium-title>Bulk Actions</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="content">
|
||||
<h1 data-trilium-h1>Bulk Actions</h1>
|
||||
|
||||
<div class="ck-content">
|
||||
<figure class="image">
|
||||
<img style="aspect-ratio:1425/654;" src="Bulk Actions_image.png" width="1425"
|
||||
height="654">
|
||||
</figure>
|
||||
<p>The <em>Bulk Actions</em> dialog makes it easy to apply changes to multiple
|
||||
notes at once, ranging from simple actions such as adding or removing a
|
||||
label to being executing custom scripts.</p>
|
||||
<h2>Interaction</h2>
|
||||
<ul>
|
||||
<li>The first step is to select the notes in the <a class="reference-link"
|
||||
href="#root/_help_oPVyFC7WL2Lp">Note Tree</a>. It's possible to apply bulk
|
||||
actions to:
|
||||
<ul>
|
||||
<li>A single note (and potentially its child notes) simply by clicking on
|
||||
it (with a left click or a right click).</li>
|
||||
<li>Multiple notes. See <a class="reference-link" href="#root/_help_yTjUdsOi4CIE">Multiple selection</a> on
|
||||
how to do so.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Right click in the <a class="reference-link" href="#root/_help_oPVyFC7WL2Lp">Note Tree</a> and
|
||||
select <em>Advanced</em> → <em>Apply bulk actions</em>.</li>
|
||||
<li>By default, only the selected notes will be affected. To also include
|
||||
all the descendants of the notes, check <em>Include descendants of the selected notes</em>.
|
||||
The number of affected notes at the top of the dialog will update to reflect
|
||||
the change.</li>
|
||||
<li>Click on which action to apply from the <em>Available actions</em> section.
|
||||
A detailed description of each is available in the next section.
|
||||
<ul>
|
||||
<li>For each action selected, the <em>Chosen actions</em> section will update
|
||||
to reveal the entry. Each action will have its own configuration.</li>
|
||||
<li>To remove an action, simply press the X button to the right of it.</li>
|
||||
<li>It is possible to apply multiple actions of the same type, such as adding
|
||||
multiple types.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>When all the actions are defined, press <em>Execute bulk actions</em> to
|
||||
trigger all of them at once.</li>
|
||||
<li>For convenience, the last bulk action configuration is saved for further
|
||||
use and will be restored when entering the dialog again.</li>
|
||||
</ul>
|
||||
<h2>Actions</h2>
|
||||
<h3>Labels</h3>
|
||||
<p>These actions operate the <a class="reference-link" href="#root/_help_HI6GBBIduIgv">Labels</a> of
|
||||
a note:</p>
|
||||
<ul>
|
||||
<li><strong>Add label</strong>
|
||||
<ul>
|
||||
<li>For each note, if it doesn't already have a <a href="#root/_help_HI6GBBIduIgv">label</a> of
|
||||
the given name, it will create it. Keep the <em>New value</em> field empty
|
||||
to create a label without a value, or complete it to assign a value.</li>
|
||||
<li>If a note already has this label, its value will be updated.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>Update label value</strong>
|
||||
<ul>
|
||||
<li>For each note, if it has a <a href="#root/_help_HI6GBBIduIgv">label</a> of
|
||||
the given name, it will change its value to the specified one. Leave <em>New value</em> field
|
||||
empty to create a label without a value.</li>
|
||||
<li>Notes without the label will not be affected.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><em><strong>Rename label</strong></em>
|
||||
<ul>
|
||||
<li>For each note, if it has a <a href="#root/_help_HI6GBBIduIgv">label</a> of
|
||||
the given name, it will be renamed/replaced with a label of the new name.
|
||||
The value of the label (if present) will be kept intact.</li>
|
||||
<li>Notes without the label will not be affected.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>Delete label</strong>
|
||||
<ul>
|
||||
<li>For each note, if it has a label of a given name, it will be deleted (regardless
|
||||
of whether it has a value or not).</li>
|
||||
<li>Notes without the label will not be affected.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Relations</h3>
|
||||
<p>These actions operate the <a class="reference-link" href="#root/_help_Cq5X6iKQop6R">Relations</a> of
|
||||
a note:</p>
|
||||
<ul>
|
||||
<li><strong>Add relation</strong>
|
||||
<ul>
|
||||
<li>For each note, it will create a relation pointing to the given note.</li>
|
||||
<li>Notes without this relation will not be affected.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>Update relation target</strong>
|
||||
<ul>
|
||||
<li>For each note, it will modify a relation to point to the newly given note.</li>
|
||||
<li>Notes without this relation will not be affected.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>Rename relation</strong>
|
||||
<ul>
|
||||
<li>For each note, if it has a relation of the given name, it will be renamed/replaced
|
||||
with a relation of the new name. The target note of the relation will be
|
||||
kept intact.</li>
|
||||
<li>Notes without this relation will not be affected.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>Delete relation</strong>
|
||||
<ul>
|
||||
<li>For each note, if it has a relation of the given name, it will be deleted.</li>
|
||||
<li>Notes without this relation will not be affected.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Notes</h3>
|
||||
<ul>
|
||||
<li><strong>Rename note</strong>
|
||||
<ul>
|
||||
<li>For each note, it will change the title of the note to the given one.</li>
|
||||
<li>As a more advanced use case, the note can be a “template string” which
|
||||
allows for dynamic values with access to the note information via
|
||||
<a
|
||||
class="reference-link" href="#root/_help_habiZ3HU8Kw8">FNote</a>, for example:
|
||||
<ul>
|
||||
<li><code>NEW: ${note.title}</code> will prefix all notes with <code>NEW:</code> .</li>
|
||||
<li><code>${note.dateCreatedObj.format('MM-DD:')}: ${note.title}</code> will
|
||||
prefix the note titles with each note's creation date (in month-day format).</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>Move note</strong>
|
||||
<ul>
|
||||
<li>For each note, it will be moved to the specified parent note.</li>
|
||||
<li>As an alternative for less complex situations, the notes can be moved
|
||||
directly from within the <a class="reference-link" href="#root/_help_oPVyFC7WL2Lp">Note Tree</a> via
|
||||
cut → paste or via the contextual menu.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>Delete note</strong>
|
||||
<ul>
|
||||
<li>For each note, it will be deleted.</li>
|
||||
<li>As an alternative for less complex situations, the notes can be removed
|
||||
directly from within the <a class="reference-link" href="#root/_help_oPVyFC7WL2Lp">Note Tree</a> by
|
||||
selecting them and pressing <kbd>Delete</kbd>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>Delete note revisions</strong>
|
||||
<ul>
|
||||
<li>This will delete all the <a class="reference-link" href="#root/_help_vZWERwf8U3nx">Note Revisions</a> of
|
||||
the notes.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Others</h3>
|
||||
<ul>
|
||||
<li><strong>Execute script</strong>
|
||||
<ul>
|
||||
<li>For more complex scenarios, it is possible to type in a JavaScript expression
|
||||
in order to apply the necessary changes.</li>
|
||||
<li>Examples:
|
||||
<ul>
|
||||
<li>
|
||||
<p>To apply a suffix (<code>- suffix</code> in this example), to the note
|
||||
title:</p><pre><code class="language-application-javascript-env-backend">note.title = note.title + " - suffix";</code></pre>
|
||||
</li>
|
||||
<li>
|
||||
<p>To alter attributes of a note based on another attribute, such as setting
|
||||
the <code>#shareAlias</code> label to the title of the note:</p><pre><code class="language-application-javascript-env-backend">note.setLabel("shareAlias", note.title)</code></pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
BIN
src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Bulk Actions_image.png
generated
Normal file
After Width: | Height: | Size: 82 KiB |
@ -1,27 +0,0 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="../../style.css">
|
||||
<base target="_parent">
|
||||
<title data-trilium-title>Bulk actions</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="content">
|
||||
<h1 data-trilium-h1>Bulk actions</h1>
|
||||
|
||||
<div class="ck-content">
|
||||
<h3>Execute script</h3>
|
||||
<p>For more complex scenarios, it is possible to type in a JavaScript expression
|
||||
in order to apply the necessary changes.</p>
|
||||
<p>To apply a suffix (<code>- suffix</code> in this example), to the note
|
||||
title:</p><pre><code class="language-application-javascript-env-backend">note.title = note.title + " - suffix";</code></pre>
|
||||
<p>To alter attributes of a note in a bulk action, such as setting the <code>#shareAlias</code> label
|
||||
to the title of the note:</p><pre><code class="language-application-javascript-env-backend">note.setLabel("shareAlias", note.title)</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -0,0 +1,37 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
<base target="_parent">
|
||||
<title data-trilium-title>Trilium instance</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="content">
|
||||
<h1 data-trilium-h1>Trilium instance</h1>
|
||||
|
||||
<div class="ck-content">
|
||||
<p>A Trilium instance represents a server. If <a class="reference-link"
|
||||
href="#root/_help_cbkrhQjrkKrh">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.</p>
|
||||
<h2>Setting the instance name</h2>
|
||||
<p>To set up a name for the instance, modify the <code>config.ini</code>:</p><pre><code class="language-text-x-trilium-auto">[General]
|
||||
instanceName=Hello</code></pre>
|
||||
<h2>Distinguishing the instance on back-end</h2>
|
||||
<p>Use <code>api.getInstanceName()</code> to obtain the instance name of the
|
||||
current server, as specified in the config file or in environment variables.</p>
|
||||
<h2>Limiting script runs based on instance</h2>
|
||||
<p>For a script that is run periodically or on a certain event, it's possible
|
||||
to limit it to certain instances without having to change the code. Just
|
||||
add <code>runOnInstance</code> and set as the value the instance name where
|
||||
the script should run. To run on multiple named instances, simply add the
|
||||
label multiple times.</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -13,14 +13,14 @@
|
||||
<h1 data-trilium-h1>Custom Request Handler</h1>
|
||||
|
||||
<div class="ck-content">
|
||||
<p>Trilium provides a mechanism for <a href="../Scripting.html">scripts</a> to
|
||||
<p>Trilium provides a mechanism for <a href="#root/_help_CdNpE2pqjmI6">scripts</a> to
|
||||
open a public REST endpoint. This opens a way for various integrations
|
||||
with other services - a simple example would be creating new note from
|
||||
Slack by issuing a slash command (e.g. <code>/trilium buy milk</code>).</p>
|
||||
<h2>Create note from outside Trilium</h2>
|
||||
<p>Let's take a look at an example. The goal is to provide a REST endpoint
|
||||
to which we can send title and content and Trilium will create a note.</p>
|
||||
<p>We'll start with creating a JavaScript backend <a href="../Note%20Types/Code.html">code note</a> containing:</p><pre><code class="language-text-x-trilium-auto">const {req, res} = api;
|
||||
<p>We'll start with creating a JavaScript backend <a href="#root/_help_6f9hih2hXXZk">code note</a> containing:</p><pre><code class="language-text-x-trilium-auto">const {req, res} = api;
|
||||
const {secret, title, content} = req.body;
|
||||
|
||||
if (req.method == 'POST' && secret === 'secret-password') {
|
||||
@ -55,7 +55,7 @@ Content-Type: application/json
|
||||
}+++++++++++++++++++++++++++++++++++++++++++++++</code></pre>
|
||||
<p>Notice the <code>/custom</code> part in the request path - Trilium considers
|
||||
any request with this prefix as "custom" and tries to find a matching handler
|
||||
by looking at all notes which have <code>customRequestHandler</code> <a href="Attributes.html">label</a>.
|
||||
by looking at all notes which have <code>customRequestHandler</code> <a href="#root/_help_zEY4DaJG4YT5">label</a>.
|
||||
Value of this label then contains a regular expression which will match
|
||||
the request path (in our case trivial regex "create-note").</p>
|
||||
<p>Trilium will then find our code note created above and execute it. <code>api.req</code>, <code>api.res</code> are
|
||||
@ -68,12 +68,12 @@ Content-Type: application/json
|
||||
and you need to take care of this yourself.</p>
|
||||
<p>Once we pass these checks we will just create the desired note using
|
||||
<a
|
||||
href="../Note%20Types/Code/Script%20API.html">Script API</a>.</p>
|
||||
href="#root/_help_GLks18SNjxmC">Script API</a>.</p>
|
||||
<h2>Custom resource provider</h2>
|
||||
<p>Another common use case is that you want to just expose a file note -
|
||||
in such case you create label <code>customResourceProvider</code> (value
|
||||
is again path regex).</p>
|
||||
<p>For more information, see <a href="Custom%20Resource%20Providers.html">Custom Resource Providers</a>.</p>
|
||||
<p>For more information, see <a href="#root/_help_d3fAXQ2diepH">Custom Resource Providers</a>.</p>
|
||||
<h2>Advanced concepts</h2>
|
||||
<p><code>api.req</code> and <code>api.res</code> are Express.js objects - you
|
||||
can always look into its <a href="https://expressjs.com/en/api.html">documentation</a> for
|
||||
|
@ -16,30 +16,30 @@
|
||||
<p>Your Trilium data is stored in a <a href="https://www.sqlite.org">SQLite</a> database
|
||||
which contains all notes, tree structure, metadata, and most of the configuration.
|
||||
The database file is named <code>document.db</code> and is stored in the
|
||||
application's default <a href="../Installation%20%26%20Setup/Data%20directory.html">Data directory</a>.</p>
|
||||
application's default <a href="#root/_help_tAassRL4RSQL">Data directory</a>.</p>
|
||||
<h2>Demo Notes</h2>
|
||||
<p>When first starting Trilium, it will provide a set of notes to showcase
|
||||
various features of the application.</p>
|
||||
<p>For more information see <a class="reference-link" href="Database/Demo%20Notes.html">Demo Notes</a>.</p>
|
||||
<p>For more information see <a class="reference-link" href="#root/_help_6tZeKvSHEUiB">Demo Notes</a>.</p>
|
||||
<h2>Manually Modifying the Database</h2>
|
||||
<p>Trilium provides a lot of flexibility, and with it, opportunities for
|
||||
advanced users to tweak it. If you need to explore or modify the database
|
||||
directly, you can use a tool such as <a href="https://sqlitebrowser.org/">SQLite Browser</a> to
|
||||
work directly on the database file.</p>
|
||||
<p>See <a href="Database/Manually%20altering%20the%20database.html">Manually altering the database</a> for
|
||||
<p>See <a href="#root/_help_oyIAJ9PvvwHX">Manually altering the database</a> for
|
||||
more information.</p>
|
||||
<h2>How to Reset the Database</h2>
|
||||
<p>If you are experimenting with Trilium and want to return it to its original
|
||||
state, you can do that by deleting the current database. When you restart
|
||||
the application, it will generate a new database containing the original
|
||||
demo notes.</p>
|
||||
<p>To delete the database, simply go to the <a href="../Installation%20%26%20Setup/Data%20directory.html">data directory</a> and
|
||||
<p>To delete the database, simply go to the <a href="#root/_help_tAassRL4RSQL">data directory</a> and
|
||||
delete the <code>document.db</code> file (and any other files starting with <code>document.db</code>).</p>
|
||||
<p>If you do not need to preserve any configurations that might be stored
|
||||
in the <code>config.ini</code> file, you can just delete all of the <a href="../Installation%20%26%20Setup/Data%20directory.html">data directory's</a> contents
|
||||
in the <code>config.ini</code> file, you can just delete all of the <a href="#root/_help_tAassRL4RSQL">data directory's</a> contents
|
||||
to fully restore the application to its original state. You can also review
|
||||
the <a href="Configuration%20(config.ini%20or%20e.html">configuration</a> file
|
||||
to provide all <code>config.ini</code> values as environment variables instead.</p>
|
||||
the <a href="#root/_help_Gzjqa934BdH4">configuration</a> file to provide
|
||||
all <code>config.ini</code> values as environment variables instead.</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
@ -16,15 +16,15 @@
|
||||
<p>When you run Trilium for the first time, it will generate a new database
|
||||
containing demo notes. These notes showcase its many features, such as:</p>
|
||||
<ul>
|
||||
<li><a class="reference-link" href="../../Note%20Types/Relation%20Map.html">Relation Map</a>
|
||||
<li><a class="reference-link" href="#root/_help_iRwzGnHPzonm">Relation Map</a>
|
||||
</li>
|
||||
<li><a class="reference-link" href="../Advanced%20Showcases/Day%20Notes.html">Day Notes</a>
|
||||
<li><a class="reference-link" href="#root/_help_l0tKav7yLHGF">Day Notes</a>
|
||||
</li>
|
||||
<li><a class="reference-link" href="../Advanced%20Showcases/Weight%20Tracker.html">Weight Tracker</a>
|
||||
<li><a class="reference-link" href="#root/_help_R7abl2fc6Mxi">Weight Tracker</a>
|
||||
</li>
|
||||
<li><a class="reference-link" href="../Advanced%20Showcases/Task%20Manager.html">Task Manager</a>
|
||||
<li><a class="reference-link" href="#root/_help_xYjQUYhpbUEW">Task Manager</a>
|
||||
</li>
|
||||
<li><a class="reference-link" href="../../Basic%20Concepts%20and%20Features/Themes.html">Themes</a>
|
||||
<li><a class="reference-link" href="#root/_help_Wy267RK4M69c">Themes</a>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Restoring Demo Notes</h3>
|
||||
|
@ -20,7 +20,7 @@
|
||||
of your <code>document.db</code> file.</p>
|
||||
<h2>Modifying it internally using the SQL Console</h2>
|
||||
<p>The SQL Console is Trilium's built-in database editor.</p>
|
||||
<p>See <a class="reference-link" href="Manually%20altering%20the%20database/SQL%20Console.html">SQL Console</a>.</p>
|
||||
<p>See <a class="reference-link" href="#root/_help_YKWqdJhzi2VY">SQL Console</a>.</p>
|
||||
<h2>Externally modifying the database</h2>
|
||||
<p>Sometimes the SQL Console cannot be used (for example if the application
|
||||
cannot start).</p>
|
||||
@ -32,7 +32,7 @@
|
||||
<p>To do so:</p>
|
||||
<ol>
|
||||
<li>In the main menu, select File → Open database… and navigate to the database
|
||||
in the <a href="../../Installation%20%26%20Setup/Data%20directory.html">Data directory</a>.</li>
|
||||
in the <a href="#root/_help_tAassRL4RSQL">Data directory</a>.</li>
|
||||
<li>Select the <em>Execute SQL</em> tab.</li>
|
||||
<li>Type in the desired SQL statement.</li>
|
||||
<li>Press the "Play" button in the toolbar underneath the "Execute SQL" tab
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<div class="ck-content">
|
||||
<p>The SQL Console is Trilium's built-in database editor.</p>
|
||||
<p>It can be accessed by going to the <a href="../../../Basic%20Concepts%20and%20Features/UI%20Elements">global menu</a> →
|
||||
<p>It can be accessed by going to the <a href="#root/_help_Vc8PjrjAGuOp">global menu</a> →
|
||||
Advanced → Open SQL Console.</p>
|
||||
<p>
|
||||
<img src="SQL Console_image.png">
|
||||
@ -42,7 +42,7 @@
|
||||
<h3>Saved SQL console</h3>
|
||||
<p>SQL queries or commands can be saved into a dedicated note.</p>
|
||||
<p>To do so, simply write the query and press the
|
||||
<img src="2_SQL Console_image.png">button. Once saved, the note will appear in <a href="../../Advanced%20Showcases/Day%20Notes.html">Day Notes</a>.</p>
|
||||
<img src="2_SQL Console_image.png">button. Once saved, the note will appear in <a href="#root/_help_l0tKav7yLHGF">Day Notes</a>.</p>
|
||||
<ul>
|
||||
<li>The SQL expression will not be displayed by default, but it can still
|
||||
be viewed by going to the note context menu and selecting <em>Note source</em>.</li>
|
||||
|
@ -18,7 +18,7 @@
|
||||
note title.</p>
|
||||
<p>For this use case, Trilium (since v0.52) supports <code>#titleTemplate</code>
|
||||
<a
|
||||
href="Attributes.html">label</a>. You can create such a label for a given note, assign it a value,
|
||||
href="#root/_help_zEY4DaJG4YT5">label</a>. You can create such a label for a given note, assign it a value,
|
||||
and this value will be used as a default title when creating child notes.
|
||||
As with other labels, you can make it inheritable to apply recursively,
|
||||
and you can even place it on the root note to have it applied globally
|
||||
@ -42,23 +42,31 @@
|
||||
<p>The value of <code>#titleTemplate</code> is evaluated at the point of note's
|
||||
creation as a JavaScript string, which means it can be enriched with the
|
||||
help of JS string interpolation with dynamic data.</p>
|
||||
<p>As an example, imagine you collect server outage incidents and write some
|
||||
notes. It looks like this:</p>
|
||||
<p>Second variable injected is <code>parentNote</code> which gives access to
|
||||
the parent <a href="#root/_help_habiZ3HU8Kw8"><code>FNote</code></a>.</p>
|
||||
<p>See also <a class="reference-link" href="#root/_help_KC1HB96bqqHX">Templates</a> which
|
||||
provides similar capabilities, including default note's content.</p>
|
||||
<h3>Examples</h3>
|
||||
<ul>
|
||||
<li>Incidents
|
||||
<li>Imagine you collect server outage incidents and write some notes. It looks
|
||||
like this:
|
||||
<ul>
|
||||
<li>2022-05-09: System crash</li>
|
||||
<li>2022-05-15: Backup delay</li>
|
||||
<li>Incidents
|
||||
<ul>
|
||||
<li>2022-05-09: System crash</li>
|
||||
<li>2022-05-15: Backup delay</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>You can automatize the date assignment by assigning a label <code>#titleTemplate="${now.format('YYYY-MM-DD')}: "</code> to
|
||||
the parent note "Incidents". Whenever a new child note is created, the
|
||||
title template is evaluated with the injected <a href="https://day.js.org/docs/en/display/format">now</a> object.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>To use a parent's attribute in the title of new notes: <code>#titleTemplate="${parentNote.getLabelValue('authorName')}'s literary works"</code>
|
||||
</li>
|
||||
<li>To mirror the parent's note title: <code>${parentNote.title}</code>
|
||||
</li>
|
||||
</ul>
|
||||
<p>You can automatize the date assignment by assigning a label <code>#titleTemplate="${now.format('YYYY-MM-DD')}: "</code> to
|
||||
the parent note "Incidents". Whenever a new child note is created, the
|
||||
title template is evaluated with the injected <a href="https://day.js.org/docs/en/display/format">now</a> object.</p>
|
||||
<p>Second variable injected is <a href="https://triliumnext.github.io/Notes/backend_api/BNote.html">parentNote</a>,
|
||||
an example could be <code>#titleTemplate="${parentNote.getLabelValue('authorName')}'s literary works"</code>.</p>
|
||||
<p>See also [[<a href="Templates.html">template</a>]] which provides similar
|
||||
capabilities, including default note's content.</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
202
src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Hidden Notes.html
generated
Normal file
@ -0,0 +1,202 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="../../style.css">
|
||||
<base target="_parent">
|
||||
<title data-trilium-title>Hidden Notes</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="content">
|
||||
<h1 data-trilium-h1>Hidden Notes</h1>
|
||||
|
||||
<div class="ck-content">
|
||||
<figure class="image image-style-align-right">
|
||||
<img style="aspect-ratio:263/445;" src="Hidden Notes_image.png" width="263"
|
||||
height="445">
|
||||
</figure>
|
||||
<p>For easy extensibility, a lot of features in Trilium make use of actual
|
||||
notes to store information as opposed to having them stored in a separate
|
||||
location in the database. This allows some functions such as <a class="reference-link"
|
||||
href="#root/_help_zEY4DaJG4YT5">Attributes</a>, <a class="reference-link"
|
||||
href="#root/_help_Cq5X6iKQop6R">Relations</a> or even <a class="reference-link"
|
||||
href="#root/_help_eIg8jdvaoNNd">Search</a> and <a class="reference-link"
|
||||
href="#root/_help_QEAPj01N5f7w">Links</a> to be able to operate on
|
||||
them.</p>
|
||||
<p>As the name suggests, these notes are hidden to the user by default to
|
||||
prevent cluttering the note tree and to prevent them from being accidentally
|
||||
deleted.</p>
|
||||
<p>The hidden notes are stored in the user's <a class="reference-link"
|
||||
href="#root/_help_wX4HbRucYSDD">Database</a> just like normal notes,
|
||||
but they have a unique <a class="reference-link" href="#root/_help_m1lbrzyKDaRB">Note ID</a> which
|
||||
allows them to be distinguished from the normal ones.</p>
|
||||
<h2>Accessing the hidden note tree</h2>
|
||||
<p>From the <a class="reference-link" href="#root/_help_x3i7MxGccDuM">Global menu</a>,
|
||||
select <em>Advanced</em> → <em>Show Hidden Subtree</em>.</p>
|
||||
<h2>Contents of the hidden note tree</h2>
|
||||
<p>Here is a brief summary of all the notes within the hidden tree:</p>
|
||||
<figure
|
||||
class="table" style="width:100%;">
|
||||
<table class="ck-table-resized">
|
||||
<colgroup>
|
||||
<col style="width:19.93%;">
|
||||
<col style="width:80.07%;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Note</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a class="reference-link" href="#root/_hidden/_help__globalNoteMap">Note Map</a>
|
||||
</td>
|
||||
<td>
|
||||
<p>This note is actually opened when the <a class="reference-link" href="#root/_help_bdUJEHsAPYQR">Note Map</a> feature
|
||||
that is accessed from the <a class="reference-link" href="#root/_help_xYmIYSP6wE3F">Launch Bar</a>.</p>
|
||||
<p>It is possible to create any child notes in it without any additional
|
||||
meaning. For example, it can be used to store a list of note maps which
|
||||
can be linked to from other notes or <a href="#root/_help_u3YFHC9tQlpm">bookmarked</a>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="reference-link" href="#root/_hidden/_help__sqlConsole">SQL Console History</a>
|
||||
</td>
|
||||
<td>
|
||||
<p>When SQL queries or commands are executed in the <a class="reference-link"
|
||||
href="#root/_help_YKWqdJhzi2VY">SQL Console</a>, they are stored here,
|
||||
grouped by month. Only the query is stored and not the results.</p>
|
||||
<p>This section can be accessed without going to the hidden tree by simply
|
||||
going to the <a class="reference-link" href="#root/_help_x3i7MxGccDuM">Global menu</a> and
|
||||
selecting Advanced → Open SQL Console History.</p>
|
||||
<p>Notes can be added as children of this tree, but it's generally not recommended
|
||||
to do so to not interfere with the normal history process.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="reference-link" href="#root/_hidden/_help__search">Search History</a>
|
||||
</td>
|
||||
<td>
|
||||
<p>Whenever a search is executed from the full <a class="reference-link"
|
||||
href="#root/_help_eIg8jdvaoNNd">Search</a>, the query will be stored here,
|
||||
grouped by month. Only the search parameters are stored and not the results
|
||||
themselves.</p>
|
||||
<p>This section can be accessed without going to the hidden tree by simply
|
||||
going to the <a class="reference-link" href="#root/_help_x3i7MxGccDuM">Global menu</a> and
|
||||
selecting Advanced → Open Search History.</p>
|
||||
<p>Notes can be added as children of this tree, but it's generally not recommended
|
||||
to do so to not interfere with the normal history process.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="reference-link" href="#root/_hidden/_help__bulkAction">Bulk Action</a>
|
||||
</td>
|
||||
<td>
|
||||
<p>This section is used for <a class="reference-link" href="#root/_help_ivYnonVFBxbQ">Bulk Actions</a>.
|
||||
The last configuration for bulk actions will be stored as part of this
|
||||
note, each action in its own <code>action</code> label.</p>
|
||||
<p>Notes can be added as children of this tree, but there won't be any benefit
|
||||
in doing so.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="reference-link" href="#root/_hidden/_help__backendLog">Backend Log</a>
|
||||
</td>
|
||||
<td>
|
||||
<p>This note corresponds to the backend log feature (see <a class="reference-link"
|
||||
href="#root/_help_qzNzp9LYQyPT">Error logs</a>).</p>
|
||||
<p>This item can be accessed without going to the hidden try by going to
|
||||
the <a class="reference-link" href="#root/_help_x3i7MxGccDuM">Global menu</a> and
|
||||
selecting Advanced → Show backend log.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="reference-link" href="#root/_hidden/_help__userHidden">User Hidden</a>
|
||||
</td>
|
||||
<td>This section can be used by <a href="#root/_help_CdNpE2pqjmI6">scripts</a> to
|
||||
create their own notes that should not be directly visible to the user.
|
||||
The note can be identified by scripts by its unique ID: <code>_userHidden</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="reference-link" href="#root/_hidden/_help__lbTplRoot">Launch Bar Templates</a>
|
||||
</td>
|
||||
<td>
|
||||
<p>This section contains the templates for the creation of launchers in the
|
||||
<a
|
||||
class="reference-link" href="#root/_help_xYmIYSP6wE3F">Launch Bar</a>. It is not possible to create child notes here.</p>
|
||||
<p>Theoretically some of the notes here can be customized, but there's not
|
||||
much benefit to be had in doing so.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="reference-link" href="#root/_hidden/_help__share">Shared Notes</a>
|
||||
</td>
|
||||
<td>
|
||||
<p>This tree lists all of the notes that are <a href="#root/_help_R9pX4DGra2Vt">shared</a> publicly.
|
||||
It can be useful to track down which notes are shared regardless of their
|
||||
position in the note tree.</p>
|
||||
<p>This section can be accessed without going to the hidden tree simply by
|
||||
going to the <a class="reference-link" href="#root/_help_x3i7MxGccDuM">Global menu</a> and
|
||||
selecting <em>Show Shared Notes Subtree</em>.</p>
|
||||
<p>Sub-notes cannot be created here.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="reference-link" href="#root/_hidden/_help__lbRoot">Launch Bar</a>
|
||||
</td>
|
||||
<td>
|
||||
<p>The tree contains both available and displayed items of the <a class="reference-link"
|
||||
href="#root/_help_xYmIYSP6wE3F">Launch Bar</a>.</p>
|
||||
<p>This section can be accessed without going to the hidden tree by:</p>
|
||||
<ul>
|
||||
<li>Going to the <a class="reference-link" href="#root/_help_x3i7MxGccDuM">Global menu</a> and
|
||||
selecting <em>Configure Launchbar</em>.</li>
|
||||
<li>Right-clicking an empty space on the <a class="reference-link" href="#root/_help_xYmIYSP6wE3F">Launch Bar</a> and
|
||||
selecting <em>Configure Launchbar</em>.</li>
|
||||
</ul>
|
||||
<p>Sub-notes cannot be created here.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="reference-link" href="#root/_hidden/_help__options">Options</a>
|
||||
</td>
|
||||
<td>
|
||||
<p>This section stores the list of <a class="reference-link" href="#root/_help_4TIF1oA4VQRO">Options</a>.</p>
|
||||
<p>This section can be accessed without going to the hidden tree by:</p>
|
||||
<ul>
|
||||
<li>Going to the <a class="reference-link" href="#root/_help_x3i7MxGccDuM">Global menu</a> and
|
||||
selecting <em>Options</em>.</li>
|
||||
<li>Pressing the dedicated Options icon in the <a class="reference-link"
|
||||
href="#root/_help_xYmIYSP6wE3F">Launch Bar</a>.</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="reference-link" href="#root/_hidden/_help__lbMobileRoot">Mobile Launch Bar</a>
|
||||
</td>
|
||||
<td>
|
||||
<p>This is very similar to the <em>Launch Bar</em>, but is dedicated for the
|
||||
mobile UI only.</p>
|
||||
<p>Accessing it outside the <em>Launch Bar</em> is the same as the Launch Bar,
|
||||
but needs to be done so from the mobile interface.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="reference-link" href="#root/_hidden/_help__help">User Guide</a>
|
||||
</td>
|
||||
<td>This is where the note structure for the User Guide is actually stored.
|
||||
Only the metadata is stored, as the help itself is present as actual files
|
||||
in the application directory.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</figure>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
BIN
src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Hidden Notes_image.png
generated
Normal file
After Width: | Height: | Size: 30 KiB |
@ -22,7 +22,7 @@
|
||||
<p>When notes are exported, their note ID is kept in the metadata of the
|
||||
export. However when they are imported back in, a new note ID is generated
|
||||
for all the notes. This also includes other entities that are part of the
|
||||
import/export process such as <a class="reference-link" href="../Basic%20Concepts%20and%20Features/Notes/Attachments.html">Attachments</a>.</p>
|
||||
import/export process such as <a class="reference-link" href="#root/_help_0vhv7lsOLy82">Attachments</a>.</p>
|
||||
<h2>Note collisions</h2>
|
||||
<p>Since the Note ID is a fixed-width randomly generated number, due to the
|
||||
<a
|
||||
|
@ -21,7 +21,7 @@
|
||||
<li>Note Map, which shows the hierarchical tree structure.</li>
|
||||
</ul>
|
||||
<h2>Link Map</h2>
|
||||
<p>Shows <a href="Attributes.html">relations</a> between notes:</p>
|
||||
<p>Shows <a href="#root/_help_zEY4DaJG4YT5">relations</a> between notes:</p>
|
||||
<p>
|
||||
<img src="1_Note Map (Link map, Tree m.png">
|
||||
</p>
|
||||
@ -33,11 +33,11 @@
|
||||
<h2>Dedicated note type</h2>
|
||||
<p>Apart from the note map feature which can be accessed from any note, it
|
||||
is also possible to create a dedicated note which will display the relations
|
||||
in full screen. See <a href="../Note%20Types/Note%20Map.html">Note Map</a> for
|
||||
in full screen. See <a href="#root/_help_bdUJEHsAPYQR">Note Map</a> for
|
||||
more information.</p>
|
||||
<h2>See also</h2>
|
||||
<p><a href="../Note%20Types/Relation%20Map.html">Relation map</a> is a similar
|
||||
concept, with some differences:</p>
|
||||
<p><a href="#root/_help_iRwzGnHPzonm">Relation map</a> is a similar concept,
|
||||
with some differences:</p>
|
||||
<ul>
|
||||
<li>note map is automatically generated while relation map must be created
|
||||
manually</li>
|
||||
|
@ -15,48 +15,47 @@
|
||||
<div class="ck-content">
|
||||
<h2>Understanding the source code of the different notes</h2>
|
||||
<p>Internally, the structure of the content of each note is different based
|
||||
on the <a class="reference-link" href="../Note%20Types.html">Note Types</a>.</p>
|
||||
on the <a class="reference-link" href="#root/_help_KSZ04uQ2D1St">Note Types</a>.</p>
|
||||
<p>For example:</p>
|
||||
<ul>
|
||||
<li><a class="reference-link" href="../Note%20Types/Text.html">Text</a> notes are
|
||||
<li><a class="reference-link" href="#root/_help_iPIMuisry3hd">Text</a> notes are
|
||||
represented internally as HTML, using the <a class="reference-link"
|
||||
href="Technologies%20used/CKEditor.html">CKEditor</a> representation.
|
||||
Note that due to the custom plugins, some HTML elements are specific to
|
||||
Trilium only, for example the admonitions.</li>
|
||||
<li><a class="reference-link" href="../Note%20Types/Code.html">Code</a> notes are
|
||||
href="#root/_help_MI26XDLSAlCD">CKEditor</a> representation. Note
|
||||
that due to the custom plugins, some HTML elements are specific to Trilium
|
||||
only, for example the admonitions.</li>
|
||||
<li><a class="reference-link" href="#root/_help_6f9hih2hXXZk">Code</a> notes are
|
||||
plain text and are represented internally as-is.</li>
|
||||
<li><a class="reference-link" href="../Note%20Types/Geo%20Map.html">Geo Map</a> notes
|
||||
<li><a class="reference-link" href="#root/_help_81SGnPGMk7Xc">Geo Map</a> notes
|
||||
contain only minimal information (viewport, zoom) as a JSON.</li>
|
||||
<li><a class="reference-link" href="../Note%20Types/Canvas.html">Canvas</a> notes
|
||||
<li><a class="reference-link" href="#root/_help_grjYqerjn243">Canvas</a> notes
|
||||
are represented as JSON, with Trilium's own information alongside with
|
||||
<a
|
||||
class="reference-link" href="Technologies%20used/Excalidraw.html">Excalidraw</a>'s internal JSON representation format.</li>
|
||||
<li><a class="reference-link" href="../Note%20Types/Mind%20Map.html">Mind Map</a> notes
|
||||
class="reference-link" href="#root/_help_H0mM1lTxF9JI">Excalidraw</a>'s internal JSON representation format.</li>
|
||||
<li><a class="reference-link" href="#root/_help_gBbsAeiuUxI5">Mind Map</a> notes
|
||||
are represented as JSON, with the internal format of <a class="reference-link"
|
||||
href="Technologies%20used/MindElixir.html">MindElixir</a>.</li>
|
||||
href="#root/_help_N4IDkixaDG9C">MindElixir</a>.</li>
|
||||
</ul>
|
||||
<p>Note that some information is also stored as <a class="reference-link"
|
||||
href="../Basic%20Concepts%20and%20Features/Notes/Attachments.html">Attachments</a>.
|
||||
For example <a class="reference-link" href="../Note%20Types/Canvas.html">Canvas</a> notes
|
||||
use the attachments feature to store the custom libraries, and alongside
|
||||
with <a class="reference-link" href="../Note%20Types/Mind%20Map.html">Mind Map</a> and
|
||||
other similar note types it stores an SVG representation of the content
|
||||
for use in other features such as including in other notes, shared notes,
|
||||
etc.</p>
|
||||
href="#root/_help_0vhv7lsOLy82">Attachments</a>. For example <a class="reference-link"
|
||||
href="#root/_help_grjYqerjn243">Canvas</a> notes use the attachments
|
||||
feature to store the custom libraries, and alongside with <a class="reference-link"
|
||||
href="#root/_help_gBbsAeiuUxI5">Mind Map</a> and other similar note
|
||||
types it stores an SVG representation of the content for use in other features
|
||||
such as including in other notes, shared notes, etc.</p>
|
||||
<p>Here's part of the HTML representation of this note, as it's stored in
|
||||
the database (but prettified).</p><pre><code class="language-text-x-trilium-auto"><h2>
|
||||
Understanding the source code of the different notes
|
||||
</h2>
|
||||
<p>
|
||||
Internally, the structure of the content of each note is different based on the&nbsp;
|
||||
<a class="reference-link" href="../Note%20Types.html">
|
||||
<a class="reference-link" href="#root/_help_KSZ04uQ2D1St">
|
||||
Note Types
|
||||
</a>
|
||||
.
|
||||
</p></code></pre>
|
||||
<h2>Viewing the source code</h2>
|
||||
<p>It is possible to view the source code of a note by pressing the contextual
|
||||
menu in <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20buttons.html">Note buttons</a> and
|
||||
menu in <a class="reference-link" href="#root/_help_8YBEPzcpUgxw">Note buttons</a> and
|
||||
selecting <em>Note source</em>.</p>
|
||||
<p>
|
||||
<img src="Note source_image.png">
|
||||
|
@ -17,8 +17,9 @@
|
||||
documents. This feature is particularly useful for publishing content directly
|
||||
from your Trilium notes, making it accessible to others online.</p>
|
||||
<h2>Prerequisites</h2>
|
||||
<p>To use the sharing feature, you must have a <a href="../Installation%20%26%20Setup/Server%20Installation.html">server installation</a> of
|
||||
Trilium. This is necessary because the notes will be hosted from the server.</p>
|
||||
<p>To use the sharing feature, you must have a <a class="reference-link"
|
||||
href="#root/_help_WOcw2SLH6tbX">Server Installation</a> of Trilium.
|
||||
This is necessary because the notes will be hosted from the server.</p>
|
||||
<h2>How to Share a Note</h2>
|
||||
<ol>
|
||||
<li>
|
||||
@ -58,20 +59,21 @@
|
||||
<h3>Password Protection</h3>
|
||||
<p>To protect shared notes with a username and password, you can use the <code>#shareCredentials</code> attribute.
|
||||
Add this label to the note with the format <code>#shareCredentials="username:password"</code>.
|
||||
To protect an entire subtree, make sure the label is <a href="Attributes/Attribute%20Inheritance.html">inheritable</a>.</p>
|
||||
To protect an entire subtree, make sure the label is <a href="#root/_help_bwZpz2ajCEwO">inheritable</a>.</p>
|
||||
<h2>Advanced Sharing Options</h2>
|
||||
<h3>Customizing the Appearance of Shared Notes</h3>
|
||||
<p>The default shared page is basic in design, but you can customize it using
|
||||
your own CSS:</p>
|
||||
<ul>
|
||||
<li><strong>Custom CSS</strong>: Link a CSS <a href="../Note%20Types/Code.html">code note</a> to
|
||||
the shared page by adding a <code>~shareCss</code> relation to the note.
|
||||
If you want this style to apply to the entire subtree, make the label inheritable.
|
||||
You can hide the CSS code note from the tree navigation by adding the <code>#shareHiddenFromTree</code> label.</li>
|
||||
<li><strong>Custom CSS</strong>: Link a CSS <a class="reference-link"
|
||||
href="#root/_help_6f9hih2hXXZk">Code</a> note to the shared page by
|
||||
adding a <code>~shareCss</code> relation to the note. If you want this style
|
||||
to apply to the entire subtree, make the label inheritable. You can hide
|
||||
the CSS code note from the tree navigation by adding the <code>#shareHiddenFromTree</code> label.</li>
|
||||
<li><strong>Omitting Default CSS</strong>: For extensive styling changes,
|
||||
use the <code>#shareOmitDefaultCss</code> label to avoid conflicts with Trilium's
|
||||
<a
|
||||
href="../Basic%20Concepts%20and%20Features/Themes.html">default stylesheet</a>.</li>
|
||||
href="#root/_help_Wy267RK4M69c">default stylesheet</a>.</li>
|
||||
</ul>
|
||||
<h3>Adding JavaScript</h3>
|
||||
<p>You can inject custom JavaScript into the shared note using the <code>~shareJs</code> relation.
|
||||
@ -112,16 +114,6 @@ for (const attr of parentNote.attributes) {
|
||||
making it easier to use Trilium as a fully-fledged website. Consider combining
|
||||
this with the <code>#shareIndex</code> label, which will display a list of
|
||||
all shared notes.</p>
|
||||
<h2>Additional Options</h2>
|
||||
<ul>
|
||||
<li><strong>Raw Note Sharing</strong>: Use the <code>#shareRaw</code> label
|
||||
to share a note without any HTML wrapper.</li>
|
||||
<li><strong>Disallow Robot Indexing</strong>: Add the <code>#shareDisallowRobotIndexing</code> label
|
||||
to prevent search engines from indexing the shared page by including a <code>noindex, follow</code> meta
|
||||
tag and <code>X-Robots-Tag: noindex</code> header.</li>
|
||||
<li><strong>Shared Notes Index</strong>: For text notes with the <code>#shareIndex</code> label,
|
||||
the content will display a list of all shared note roots.</li>
|
||||
</ul>
|
||||
<h2>Limitations</h2>
|
||||
<p>While the sharing feature is powerful, it has some limitations:</p>
|
||||
<ul>
|
||||
@ -135,6 +127,84 @@ for (const attr of parentNote.attributes) {
|
||||
<li><strong>Include Notes</strong>: Not supported.</li>
|
||||
</ul>
|
||||
<p>Some of these limitations may be addressed in future updates.</p>
|
||||
<h2>Attribute reference</h2>
|
||||
<figure class="table">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Attribute</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>shareHiddenFromTree</code>
|
||||
</td>
|
||||
<td>this note is hidden from left navigation tree, but still accessible with
|
||||
its URL</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>shareExternalLink</code>
|
||||
</td>
|
||||
<td>note will act as a link to an external website in the share tree</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>shareAlias</code>
|
||||
</td>
|
||||
<td>define an alias using which the note will be available under <code>https://your_trilium_host/share/[your_alias]</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>shareOmitDefaultCss</code>
|
||||
</td>
|
||||
<td>default share page CSS will be omitted. Use when you make extensive styling
|
||||
changes.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>shareRoot</code>
|
||||
</td>
|
||||
<td>marks note which is served on /share root.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>shareDescription</code>
|
||||
</td>
|
||||
<td>define text to be added to the HTML meta tag for description</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>shareRaw</code>
|
||||
</td>
|
||||
<td>Note will be served in its raw format, without HTML wrapper. See also
|
||||
<a
|
||||
class="reference-link" href="#root/_help_Qjt68inQ2bRj">Serving directly the content of a note</a> for an alternative method
|
||||
without setting an attribute.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>shareDisallowRobotIndexing</code>
|
||||
</td>
|
||||
<td>
|
||||
<p>Indicates to web crawlers that the page should not be indexed of this
|
||||
note by:</p>
|
||||
<ul>
|
||||
<li>Setting the <code>X-Robots-Tag: noindex</code> HTTP header.</li>
|
||||
<li>Setting the <code>noindex, follow</code> meta tag.</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>shareCredentials</code>
|
||||
</td>
|
||||
<td>require credentials to access this shared note. Value is expected to be
|
||||
in format <code>username:password</code>. Don't forget to make this inheritable
|
||||
to apply to child-notes/images.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>shareIndex</code>
|
||||
</td>
|
||||
<td>Note with this label will list all roots of shared notes.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</figure>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<div class="ck-content">
|
||||
<p>One core aspect of Trilium that allows it to have support for multiple
|
||||
<a
|
||||
href="../Note%20Types.html">Note Types</a> is the fact that it makes use of various off-the-shelf
|
||||
href="#root/_help_KSZ04uQ2D1St">Note Types</a> is the fact that it makes use of various off-the-shelf
|
||||
or reusable libraries.</p>
|
||||
<p>The sub-pages showcase some of the technologies used, for a better understanding
|
||||
of how Trilium works but also to credit the developers of that particular
|
||||
|
@ -15,7 +15,7 @@
|
||||
<div class="ck-content">
|
||||
<h2>Editor core</h2>
|
||||
<p>The CKEditor is the WYSIWYG (standing for What You See Is What You Get)
|
||||
editor behind <a href="../../Note%20Types/Text.html">Text</a> notes.</p>
|
||||
editor behind <a href="#root/_help_iPIMuisry3hd">Text</a> notes.</p>
|
||||
<p>Their website is <a href="https://ckeditor.com/">ckeditor.com</a>.</p>
|
||||
<p>CKEditor by itself is a commercial product, but the core is open-source.
|
||||
As described in <a href="https://ckeditor.com/docs/ckeditor5/latest/features/index.html">its documentation</a>,
|
||||
|
@ -14,8 +14,8 @@
|
||||
|
||||
<div class="ck-content">
|
||||
<p><a href="https://excalidraw.com/">Excalidraw</a> is the technology behind
|
||||
the <a href="../../Note%20Types/Canvas.html">Canvas</a> notes.
|
||||
The source code of the library is available on <a href="https://github.com/excalidraw/excalidraw">GitHub</a>.</p>
|
||||
the <a href="#root/_help_grjYqerjn243">Canvas</a> notes. The
|
||||
source code of the library is available on <a href="https://github.com/excalidraw/excalidraw">GitHub</a>.</p>
|
||||
<p>We are using an unmodified version of it, so it shares the same <a href="https://github.com/excalidraw/excalidraw/issues">issues</a> as
|
||||
the original.</p>
|
||||
</div>
|
||||
|
@ -13,7 +13,7 @@
|
||||
<h1 data-trilium-h1>Leaflet</h1>
|
||||
|
||||
<div class="ck-content">
|
||||
<p>Leaflet is the library behind <a href="../../Note%20Types/Geo%20Map.html">Geo map</a> notes.</p>
|
||||
<p>Leaflet is the library behind <a href="#root/_help_81SGnPGMk7Xc">Geo map</a> notes.</p>
|
||||
<h2>Plugins</h2>
|
||||
<p>Leaflet is also highly customizable via external plugins.</p>
|
||||
<p>Currently we use:</p>
|
||||
|
@ -13,7 +13,7 @@
|
||||
<h1 data-trilium-h1>MindElixir</h1>
|
||||
|
||||
<div class="ck-content">
|
||||
<p>MindElixir is the library we are using for the <a href="../../Note%20Types/Mind%20Map.html">Mind Map</a> note
|
||||
<p>MindElixir is the library we are using for the <a href="#root/_help_gBbsAeiuUxI5">Mind Map</a> note
|
||||
types.</p>
|
||||
<p>The main library is available on <a href="https://github.com/SSShooter/mind-elixir-core/issues">GitHub as mind-elixir-core</a>.</p>
|
||||
<p>The library is embedded as-is without additional modifications.</p>
|
||||
|