mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-30 09:56:36 +01:00 
			
		
		
		
	fix(docs): improve reference links and fix broken links
This commit is contained in:
		| @@ -875,19 +875,26 @@ | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 20 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "cbkrhQjrkKrh", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 30 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "label", | ||||
|                                     "name": "shareAlias", | ||||
|                                     "value": "backup", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 20 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "wX4HbRucYSDD", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 40 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "cbkrhQjrkKrh", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 50 | ||||
|                                 } | ||||
|                             ], | ||||
|                             "format": "markdown", | ||||
| @@ -1056,6 +1063,13 @@ | ||||
|                                             "value": "bx bxs-layout", | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 40 | ||||
|                                         }, | ||||
|                                         { | ||||
|                                             "type": "relation", | ||||
|                                             "name": "internalLink", | ||||
|                                             "value": "4TIF1oA4VQRO", | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 50 | ||||
|                                         } | ||||
|                                     ], | ||||
|                                     "format": "markdown", | ||||
| @@ -1917,62 +1931,6 @@ | ||||
|                             "type": "text", | ||||
|                             "mime": "text/markdown", | ||||
|                             "attributes": [ | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "iPIMuisry3hd", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 10 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "6f9hih2hXXZk", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 20 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "CdNpE2pqjmI6", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 30 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "m523cpzocqaD", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 40 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "iRwzGnHPzonm", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 50 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "GTwFsgaA0lCt", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 60 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "IakOLONlIfGI", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 70 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "ODY7qQn5m2FT", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 80 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
| @@ -1993,6 +1951,62 @@ | ||||
|                                     "value": "bx bx-notepad", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 100 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "iPIMuisry3hd", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 110 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "grjYqerjn243", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 120 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "s1aBHPd79XYj", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 130 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "m523cpzocqaD", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 140 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "HcABDtFCkbFN", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 150 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "CdNpE2pqjmI6", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 160 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "IakOLONlIfGI", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 170 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "ODY7qQn5m2FT", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 180 | ||||
|                                 } | ||||
|                             ], | ||||
|                             "format": "markdown", | ||||
| @@ -2393,6 +2407,27 @@ | ||||
|                                             "value": "bx bxs-file-pdf", | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 30 | ||||
|                                         }, | ||||
|                                         { | ||||
|                                             "type": "relation", | ||||
|                                             "name": "internalLink", | ||||
|                                             "value": "wy8So3yZZlH9", | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 40 | ||||
|                                         }, | ||||
|                                         { | ||||
|                                             "type": "relation", | ||||
|                                             "name": "internalLink", | ||||
|                                             "value": "zEY4DaJG4YT5", | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 50 | ||||
|                                         }, | ||||
|                                         { | ||||
|                                             "type": "relation", | ||||
|                                             "name": "internalLink", | ||||
|                                             "value": "4TIF1oA4VQRO", | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 60 | ||||
|                                         } | ||||
|                                     ], | ||||
|                                     "format": "markdown", | ||||
| @@ -2439,27 +2474,6 @@ | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 10 | ||||
|                                         }, | ||||
|                                         { | ||||
|                                             "type": "relation", | ||||
|                                             "name": "internalLink", | ||||
|                                             "value": "iPIMuisry3hd", | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 20 | ||||
|                                         }, | ||||
|                                         { | ||||
|                                             "type": "relation", | ||||
|                                             "name": "internalLink", | ||||
|                                             "value": "6f9hih2hXXZk", | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 30 | ||||
|                                         }, | ||||
|                                         { | ||||
|                                             "type": "relation", | ||||
|                                             "name": "internalLink", | ||||
|                                             "value": "4TIF1oA4VQRO", | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 40 | ||||
|                                         }, | ||||
|                                         { | ||||
|                                             "type": "relation", | ||||
|                                             "name": "internalLink", | ||||
| @@ -2494,6 +2508,41 @@ | ||||
|                                             "value": "bx bx-edit-alt", | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 40 | ||||
|                                         }, | ||||
|                                         { | ||||
|                                             "type": "relation", | ||||
|                                             "name": "internalLink", | ||||
|                                             "value": "_optionsTextNotes", | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 80 | ||||
|                                         }, | ||||
|                                         { | ||||
|                                             "type": "relation", | ||||
|                                             "name": "internalLink", | ||||
|                                             "value": "_optionsCodeNotes", | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 90 | ||||
|                                         }, | ||||
|                                         { | ||||
|                                             "type": "relation", | ||||
|                                             "name": "internalLink", | ||||
|                                             "value": "iPIMuisry3hd", | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 100 | ||||
|                                         }, | ||||
|                                         { | ||||
|                                             "type": "relation", | ||||
|                                             "name": "internalLink", | ||||
|                                             "value": "6f9hih2hXXZk", | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 110 | ||||
|                                         }, | ||||
|                                         { | ||||
|                                             "type": "relation", | ||||
|                                             "name": "internalLink", | ||||
|                                             "value": "4TIF1oA4VQRO", | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 120 | ||||
|                                         } | ||||
|                                     ], | ||||
|                                     "format": "markdown", | ||||
| @@ -3957,6 +4006,13 @@ | ||||
|                             "value": "bx bx-edit", | ||||
|                             "isInheritable": false, | ||||
|                             "position": 10 | ||||
|                         }, | ||||
|                         { | ||||
|                             "type": "relation", | ||||
|                             "name": "internalLink", | ||||
|                             "value": "W8vYD3Q1zjCR", | ||||
|                             "isInheritable": false, | ||||
|                             "position": 180 | ||||
|                         } | ||||
|                     ], | ||||
|                     "format": "markdown", | ||||
| @@ -4924,20 +4980,13 @@ | ||||
|                                         "6f9hih2hXXZk", | ||||
|                                         "CdNpE2pqjmI6" | ||||
|                                     ], | ||||
|                                     "title": "Scripts", | ||||
|                                     "title": "Scripting", | ||||
|                                     "notePosition": 10, | ||||
|                                     "prefix": null, | ||||
|                                     "isExpanded": false, | ||||
|                                     "type": "text", | ||||
|                                     "mime": "text/markdown", | ||||
|                                     "attributes": [ | ||||
|                                         { | ||||
|                                             "type": "relation", | ||||
|                                             "name": "internalLink", | ||||
|                                             "value": "6f9hih2hXXZk", | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 10 | ||||
|                                         }, | ||||
|                                         { | ||||
|                                             "type": "relation", | ||||
|                                             "name": "internalLink", | ||||
| @@ -4986,12 +5035,19 @@ | ||||
|                                             "value": "scripts", | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 20 | ||||
|                                         }, | ||||
|                                         { | ||||
|                                             "type": "relation", | ||||
|                                             "name": "internalLink", | ||||
|                                             "value": "6f9hih2hXXZk", | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 80 | ||||
|                                         } | ||||
|                                     ], | ||||
|                                     "format": "markdown", | ||||
|                                     "dataFileName": "Scripts.md", | ||||
|                                     "dataFileName": "Scripting.md", | ||||
|                                     "attachments": [], | ||||
|                                     "dirFileName": "Scripts", | ||||
|                                     "dirFileName": "Scripting", | ||||
|                                     "children": [ | ||||
|                                         { | ||||
|                                             "isClone": false, | ||||
| @@ -8191,20 +8247,6 @@ | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 10 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "MI26XDLSAlCD", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 20 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "81SGnPGMk7Xc", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 30 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
| @@ -8212,13 +8254,6 @@ | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 40 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "H0mM1lTxF9JI", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 50 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
| @@ -8227,32 +8262,67 @@ | ||||
|                                     "position": 60 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "N4IDkixaDG9C", | ||||
|                                     "type": "label", | ||||
|                                     "name": "iconClass", | ||||
|                                     "value": "bx bx-code", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 70 | ||||
|                                     "position": 120 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "Wxt3vVlxlYLi", | ||||
|                                     "value": "iPIMuisry3hd", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 80 | ||||
|                                     "position": 150 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "MI26XDLSAlCD", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 160 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "6f9hih2hXXZk", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 170 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "81SGnPGMk7Xc", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 180 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "H0mM1lTxF9JI", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 190 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "N4IDkixaDG9C", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 200 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "0vhv7lsOLy82", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 210 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "8YBEPzcpUgxw", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 90 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "label", | ||||
|                                     "name": "iconClass", | ||||
|                                     "value": "bx bx-code", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 120 | ||||
|                                     "position": 220 | ||||
|                                 } | ||||
|                             ], | ||||
|                             "format": "markdown", | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
| # Advanced Showcases | ||||
| Trilium offers advanced functionality through [Scripts](../Note%20Types/Code/Scripts.md) and [Promoted Attributes](Attributes/Promoted%20Attributes.md). To illustrate these features, we've prepared several showcases available in the [demo notes](Database.md): | ||||
| Trilium offers advanced functionality through [Scripts](../Note%20Types/Code/Scripting.md) and [Promoted Attributes](Attributes/Promoted%20Attributes.md). To illustrate these features, we've prepared several showcases available in the [demo notes](Database.md): | ||||
|  | ||||
| *   [Relation Map](../Note%20Types/Relation%20Map.md) | ||||
| *   [Day Notes](Advanced%20Showcases/Day%20Notes.md) | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
| # Task Manager | ||||
| Task Manager is a [promoted attributes](../Attributes/Promoted%20Attributes.md) and [scripts](../../Note%20Types/Code/Scripts.md)showcase present in the [demo notes](../Database.md). | ||||
| Task Manager is a [promoted attributes](../Attributes/Promoted%20Attributes.md) and [scripts](../../Note%20Types/Code/Scripting.md)showcase present in the [demo notes](../Database.md). | ||||
|  | ||||
| ## Demo | ||||
|  | ||||
| @@ -15,7 +15,7 @@ New tasks are created in the TODO note which has `~child:template` [relation](.. | ||||
|  | ||||
| ### Attributes | ||||
|  | ||||
| Task template defines several [promoted attributes](../Attributes/Promoted%20Attributes.md) - todoDate, doneDate, tags, location. Importantly it also defines `~runOnAttributeChange` relation - [event](../../Note%20Types/Code/Events.md) handler which is run on attribute change. This [script](../../Note%20Types/Code/Scripts.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](../../Note%20Types/Code/Events.md) handler which is run on attribute change. This [script](../../Note%20Types/Code/Scripting.md) handles when e.g. we fill out the doneDate attribute - meaning the task is done and should be moved to "Done" note and removed from TODO, locations and tags. | ||||
|  | ||||
| ### New task button | ||||
|  | ||||
|   | ||||
| @@ -7,7 +7,7 @@ By adding `weight` as a [promoted attribute](../Attributes/Promoted%20Attributes | ||||
|  | ||||
| ## Implementation | ||||
|  | ||||
| The `Weight Tracker` note in the screenshot above is of the type `Render Note`. That type of note doesn't have any useful content itself. Instead it is a placeholder where a [script](../../Note%20Types/Code/Scripts.md) can render its output. | ||||
| The `Weight Tracker` note in the screenshot above is of the type `Render Note`. That type of note doesn't have any useful content itself. Instead it is a placeholder where a [script](../../Note%20Types/Code/Scripting.md) can render its output. | ||||
|  | ||||
| Scripts for `Render Notes` are defined in a [relation](../Attributes.md) called `~renderNote`. In this example, it's the `Weight Tracker`'s child `Implementation`. The Implementation consists of two [code notes](../../Note%20Types/Code.md) that contain some HTML and JavaScript respectively, which load all the notes with a `weight` attribute and display their values in a chart. | ||||
|  | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
| # Custom Request Handler | ||||
| Trilium provides a mechanism for [scripts](../Note%20Types/Code/Scripts.md) to open a public REST endpoint. This opens a way for various integrations with other services - a simple example would be creating new note from Slack by issuing a slash command (e.g. `/trilium buy milk`). | ||||
| Trilium provides a mechanism for [scripts](../Note%20Types/Code/Scripting.md) to open a public REST endpoint. This opens a way for various integrations with other services - a simple example would be creating new note from Slack by issuing a slash command (e.g. `/trilium buy milk`). | ||||
|  | ||||
| ## Create note from outside Trilium | ||||
|  | ||||
|   | ||||
| @@ -1,17 +1,17 @@ | ||||
| # Note source | ||||
| ## Understanding the source code of the different notes | ||||
|  | ||||
| Internally, the structure of the content of each note is different based on the [Note Types](../Note%20Types.md). | ||||
| Internally, the structure of the content of each note is different based on the <a class="reference-link" href="../Note%20Types.md">Note Types</a>. | ||||
|  | ||||
| For example: | ||||
|  | ||||
| *   [Text Notes](#root/_hidden/_options/_optionsTextNotes) are represented internally as HTML, using the [CKEditor](Technologies%20used/CKEditor.md) representation. Note that due to the custom plugins, some HTML elements are specific to Trilium only, for example the admonitions. | ||||
| *   [Code Notes](#root/_hidden/_options/_optionsCodeNotes) are plain text and are represented internally as-is. | ||||
| *   [Geo map](../Note%20Types/Geo%20Map.md) notes contain only minimal information (viewport, zoom) as a JSON. | ||||
| *   [Canvas](../Note%20Types/Canvas.md) notes are represented as JSON, with Trilium's own information alongside with [Excalidraw](Technologies%20used/Excalidraw.md)'s internal JSON representation format. | ||||
| *   [Mind Map](../Note%20Types/Mind%20Map.md) notes are represented as JSON, with the internal format of [MindElixir](Technologies%20used/MindElixir.md). | ||||
| *   <a class="reference-link" href="../Note%20Types/Text.md">Text</a> notes are represented internally as HTML, using the <a class="reference-link" href="Technologies%20used/CKEditor.md">CKEditor</a> representation. Note that due to the custom plugins, some HTML elements are specific to Trilium only, for example the admonitions. | ||||
| *   <a class="reference-link" href="../Note%20Types/Code.md">Code</a> notes are plain text and are represented internally as-is. | ||||
| *   <a class="reference-link" href="../Note%20Types/Geo%20Map.md">Geo Map</a> notes contain only minimal information (viewport, zoom) as a JSON. | ||||
| *   <a class="reference-link" href="../Note%20Types/Canvas.md">Canvas</a> notes are represented as JSON, with Trilium's own information alongside with <a class="reference-link" href="Technologies%20used/Excalidraw.md">Excalidraw</a>'s internal JSON representation format. | ||||
| *   <a class="reference-link" href="../Note%20Types/Mind%20Map.md">Mind Map</a> notes are represented as JSON, with the internal format of <a class="reference-link" href="Technologies%20used/MindElixir.md">MindElixir</a>. | ||||
|  | ||||
| Note that some information is also stored as [Attachments](../Attachments). For example [Canvas](../Note%20Types/Canvas.md) notes use the attachments feature to store the custom libraries, and alongside with [Mind Map](../Note%20Types/Mind%20Map.md) 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. | ||||
| Note that some information is also stored as <a class="reference-link" href="../Basic%20Concepts%20and%20Features/Notes/Attachments.md">Attachments</a>. For example <a class="reference-link" href="../Note%20Types/Canvas.md">Canvas</a> notes use the attachments feature to store the custom libraries, and alongside with <a class="reference-link" href="../Note%20Types/Mind%20Map.md">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. | ||||
|  | ||||
| Here's part of the HTML representation of this note, as it's stored in the database (but prettified). | ||||
|  | ||||
| @@ -30,7 +30,7 @@ Here's part of the HTML representation of this note, as it's stored in the datab | ||||
|  | ||||
| ## Viewing the source code | ||||
|  | ||||
| It is possible to view the source code of a note by pressing the contextual menu in [Note buttons](../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20buttons.md) and selecting _Note source_. | ||||
| 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.md">Note buttons</a> and selecting _Note source_. | ||||
|  | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -3,16 +3,9 @@ Note is a central entity in Trilium. Main attributes of note are title and conte | ||||
|  | ||||
| ### Note types | ||||
|  | ||||
| *   [text note](../Note%20Types/Text.md) - this is default note type which allows you to put rich text, images etc. | ||||
| *   [code note](../Note%20Types/Code.md) - some kind of formal code, typically programming language (e.g. JavaScript) or data structure (e.g. JSON) | ||||
| *   [image note](https://github.com/TriliumNext/Notes/wiki/Images) - represents single image | ||||
| *   file note - represents uploaded file (e.g. docx MS Word document). | ||||
| *   render HTML note - this works as an output screen of attached [scripts](../Note%20Types/Code/Scripts.md) | ||||
| *   [saved search](../Note%20Types/Saved%20Search.md) note - contains saved search query and dynamically displays result of the search as its sub-notes | ||||
| *   [relation map](../Note%20Types/Relation%20Map.md) note - visualizes notes and their relations | ||||
| *   [book note](../Note%20Types/Book.md) - displays its children notes, useful for reading many short notes | ||||
| *   mermaid - create diagrams and flowcharts using [mermaid.js ↗](https://github.com/mermaid-js/mermaid) | ||||
| *   [canvas note](#root/fKYGY3OOo5d1) - allows hand drawn notes and basic diagraming on an infinite canvas using [excalidraw ↗](https://github.com/excalidraw/excalidraw) | ||||
| The main note type is a rich-text note type called <a class="reference-link" href="../Note%20Types/Text.md">Text</a>. For diagrams and drawing there is <a class="reference-link" href="../Note%20Types/Canvas.md">Canvas</a> and <a class="reference-link" href="../Note%20Types/Mermaid%20Diagrams.md">Mermaid Diagrams</a>. | ||||
|  | ||||
| There are also more complex note types such as <a class="reference-link" href="../Note%20Types/Saved%20Search.md">Saved Search</a>, <a class="reference-link" href="../Note%20Types/Render%20Note.md">Render Note</a> that usually go hand-in-hand with <a class="reference-link" href="../Note%20Types/Code/Scripting.md">Scripting</a>. | ||||
|  | ||||
| In Trilium there's no specific "folder" note type. Any note can have children and thus be a folder. | ||||
|  | ||||
| @@ -22,7 +15,7 @@ There's one special note called "root note" which is root of the note tree. All | ||||
|  | ||||
| ### Tree structure | ||||
|  | ||||
| Importantly, note itself doesn't carry information on its placement in note tree. See [cloning](Notes/Cloning%20Notes.md) for details. | ||||
| Importantly, note itself doesn't carry information on its placement in note tree. See <a class="reference-link" href="Notes/Cloning%20Notes.md">Cloning Notes</a> for details. | ||||
|  | ||||
| Tree structure of notes can resemble file system - but compared to that notes in Trilium can act as both file and directory - meaning that note can both have its own content and have children. "Leaf note" is a note which doesn't have any children. | ||||
|  | ||||
| @@ -36,7 +29,7 @@ Clicking an undelete will recover the note, it's content and attributes - note s | ||||
|  | ||||
| To be able to undelete a note, it is necessary that deleted note's parent must be undeleted (otherwise there's no place where we can undelete it to). This might become a problem when you delete more notes in succession - the solution is then undelete in the reverse order of your deletion. | ||||
|  | ||||
| After the 7 days (configurable) the notes will be "erased" - their title, content, revisions and attributes will be erased, and it will not be possible anymore to recover them (unless you restore [backup](../Installation%20%26%20Setup/Backup.md)). | ||||
| After the 7 days (configurable) the notes will be "erased" - their title, content, revisions and attributes will be erased, and it will not be possible anymore to recover them (unless you restore a <a class="reference-link" href="../Installation%20%26%20Setup/Backup.md">Backup</a>). | ||||
|  | ||||
| ## See also | ||||
|  | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| # Attachments | ||||
| A [note](../Notes.md) in Trilium can _own_ one or more attachments, which can be either images or files. These attachments can be displayed or linked within the note that owns them. | ||||
|  | ||||
| This can be especially useful to include dependencies for your [scripts](../../Note%20Types/Code/Scripts.md). The <a class="reference-link" href="../../Advanced%20Usage/Advanced%20Showcases/Weight%20Tracker.md">Weight Tracker</a> shows how to use [chartjs](https://chartjs.org/) which is attached to the [script note](#root/HcUYTojFohtb). | ||||
| This can be especially useful to include dependencies for your [scripts](../../Note%20Types/Code/Scripting.md). The <a class="reference-link" href="../../Advanced%20Usage/Advanced%20Showcases/Weight%20Tracker.md">Weight Tracker</a> shows how to use [chartjs](https://chartjs.org/) which is attached to the script note. | ||||
|  | ||||
| Each note exclusively owns its attachments, meaning attachments cannot be shared or linked from one note to another. If an attachment link is copied to a different note, the attachment itself is duplicated, and the copies are managed independently thereafter. | ||||
|  | ||||
|   | ||||
| @@ -23,11 +23,11 @@ gio mime application/pdf | ||||
|  | ||||
| ## Reporting issues with the rendering | ||||
|  | ||||
| Should you encounter any visual issues in the resulting PDF file (e.g. a table does not fit properly, there is cut off text, etc.) feel free to [report the issue](#root/OeKBfN6JbMIq/jRV1MPt4mNSP/hrC6xn7hnDq5). In this case, it's best to offer a sample note (click on the  button, select Export note → This note and all of its descendants → HTML in ZIP archive). Make sure not to accidentally leak any personal information. | ||||
| Should you encounter any visual issues in the resulting PDF file (e.g. a table does not fit properly, there is cut off text, etc.) feel free to [report the issue](../../Troubleshooting/Reporting%20issues.md). In this case, it's best to offer a sample note (click on the  button, select Export note → This note and all of its descendants → HTML in ZIP archive). Make sure not to accidentally leak any personal information. | ||||
|  | ||||
| ## Landscape mode | ||||
|  | ||||
| When exporting to PDF, there are no customizable settings such as page orientation, size, etc. However, it is possible to specify a given note to be printed as a PDF in landscape mode by adding the `#printLandscape` attribute to it (see [\[missing note\]](#root/9QRytp0ZYFIf/PnO38wN0ffOA)). | ||||
| When exporting to PDF, there are no customizable settings such as page orientation, size, etc. However, it is possible to specify a given note to be printed as a PDF in landscape mode by adding the `#printLandscape` attribute to it (see <a class="reference-link" href="../../Advanced%20Usage/Attributes.md">Attributes</a>). | ||||
|  | ||||
| ## Page size | ||||
|  | ||||
| @@ -35,4 +35,4 @@ By default, the resulting PDF will be in Letter format. It is possible to adjust | ||||
|  | ||||
| ## Keyboard shortcut | ||||
|  | ||||
| It's possible to trigger the export to PDF from the keyboard by going to _Keyboard shortcuts_ and assigning a key combination for the `exportAsPdf` action. | ||||
| It's possible to trigger the export to PDF from the keyboard by going to _Keyboard shortcuts_ in <a class="reference-link" href="../UI%20Elements/Options.md">Options</a> and assigning a key combination for the `exportAsPdf` action. | ||||
| @@ -1,5 +1,5 @@ | ||||
| # Read-Only Notes | ||||
| Some note types such as [Text](../../Note%20Types/Text.md) and [Code](../../Note%20Types/Code.md) notes in Trilium can be set to read-only. When a note is in read-only mode, it is presented to the user in a non-editable view, with the option to switch to editing mode if needed. | ||||
| Some note types such as <a class="reference-link" href="../../Note%20Types/Text.md">Text</a> and <a class="reference-link" href="../../Note%20Types/Code.md">Code</a> notes in Trilium can be set to read-only. When a note is in read-only mode, it is presented to the user in a non-editable view, with the option to switch to editing mode if needed. | ||||
|  | ||||
| ## Automatic read-only mode | ||||
|  | ||||
| @@ -7,7 +7,7 @@ For optimization purposes, Trilium will automatically set very large notes to re | ||||
|  | ||||
| This behavior can be disabled on a per-note basis, by following the instructions of the next section. | ||||
|  | ||||
| In addition, it's possible to change the number of characters at which the automatic read-only mode will trigger in [Options](../UI%20Elements/Options.md) by going to the options for <a class="reference-link" href="#root/_hidden/_options/_optionsTextNotes">Text Notes</a> and <a class="reference-link" href="#root/_hidden/_options/_optionsCodeNotes">Code Notes</a>. | ||||
| In addition, it's possible to change the number of characters at which the automatic read-only mode will trigger in <a class="reference-link" href="../UI%20Elements/Options.md">Options</a> by going to the options for <a class="reference-link" href="#root/_hidden/_options/_optionsTextNotes">Text Notes</a> and <a class="reference-link" href="#root/_hidden/_options/_optionsCodeNotes">Code Notes</a>. | ||||
|  | ||||
| ## Changing a note's read-only behavior | ||||
|  | ||||
| @@ -15,8 +15,10 @@ Via the <a class="reference-link" href="../UI%20Elements/Ribbon.md">Ribbon</a>, | ||||
|  | ||||
| *   **Auto**   | ||||
|     This is the default behavior in which the note will be editable by default, unless it becomes large enough to trigger read-only mode.   | ||||
|       | ||||
| *   **Read-only**   | ||||
|     The note will be always marked as read-only, regardless of its size. Nevertheless, it's still possible to temporarily edit the note if needed. This is generally useful for notes that are not prone to change.   | ||||
|       | ||||
| *   **Always Editable**   | ||||
|     This option will bypass the automatic read-only activation for this particular note. It's useful for large notes that are frequently edited. | ||||
|  | ||||
|   | ||||
| @@ -83,7 +83,7 @@ If you make changes to your theme, press <kbd>Ctrl</kbd> + <kbd>R</kbd> to reloa | ||||
|  | ||||
| Custom themes can be exported as `.tar` archives, which can be shared with other users. However, be cautious when importing themes from untrusted sources, as they may contain executable scripts that could pose security risks. | ||||
|  | ||||
| An example user theme, _Steel Blue_, is available in the [demo document](#root/xjSsCcvVZf6H). | ||||
| An example user theme, _Steel Blue_, is available in the demo document. | ||||
|  | ||||
|  | ||||
|  | ||||
| @@ -95,7 +95,7 @@ In addition to full themes, Trilium allows for custom CSS that isn't tied to a t | ||||
|  | ||||
| To use custom CSS: | ||||
|  | ||||
| 1.  **Create a CSS Code Note**: Create a new [code note](../Note%20Types/Code.md) with the `CSS` type. | ||||
| 1.  **Create a CSS Code Note**: Create a new <a class="reference-link" href="../Note%20Types/Code.md">Code</a> note with the `CSS` type. | ||||
| 2.  **Add the** `appCss` **Label**: Annotate the note with the `#appCss` [label](../Advanced%20Usage/Attributes.md). | ||||
| 3.  **Write Your CSS**: Add your custom CSS rules to the note. | ||||
|  | ||||
|   | ||||
| @@ -50,7 +50,7 @@ Right click either the _Available launchers_ or _Visible launchers_ sections and | ||||
|     2.  Optionally, set `hoistedNote` to hoist a particular note. See [Note Hoisting](../Navigation/Note%20Hoisting.md) for more information. | ||||
|     3.  Optionally, set a `keyboardShortcut` to trigger the launcher. | ||||
| 2.  **Script Launcher**   | ||||
|     An advanced launcher which will run a script upon pressing. See [Scripts](../../Note%20Types/Code/Scripts.md) for more information. | ||||
|     An advanced launcher which will run a script upon pressing. See [Scripts](../../Note%20Types/Code/Scripting.md) for more information. | ||||
|      | ||||
|     1.  Set `script` to point to the desired script to run. | ||||
|     2.  Optionally, set a `keyboardShortcut` to trigger the launcher. | ||||
|   | ||||
| @@ -7,11 +7,11 @@ Trilium supports two different layouts, based on your preference. | ||||
|  | ||||
| The vertical layout is Trilium's original layout: | ||||
|  | ||||
| *   The [Launcher Bar](Launch%20Bar.md) is positioned on the left side of the screen, with buttons being laid out vertically. | ||||
| *   The tab bar is at the top, but to the right of the [Note Tree](Note%20Tree.md). | ||||
| *   The [Quick search](../Navigation/Quick%20search.md) is at the top of the [Note Tree](Note%20Tree.md). | ||||
| *   The [Note Tree](Note%20Tree.md) can be collapsed by pressing the  button at the bottom of the [Launcher Bar](Launch%20Bar.md). | ||||
| *   The [Global menu](Global%20menu.md) can be accessed via the  icon at the top of the [Launcher Bar](Launch%20Bar.md). | ||||
| *   The <a class="reference-link" href="Launch%20Bar.md">Launch Bar</a> is positioned on the left side of the screen, with buttons being laid out vertically. | ||||
| *   The tab bar is at the top, but to the right of the <a class="reference-link" href="Note%20Tree.md">Note Tree</a>. | ||||
| *   The <a class="reference-link" href="../Navigation/Quick%20search.md">Quick search</a> is at the top of the <a class="reference-link" href="Note%20Tree.md">Note Tree</a>. | ||||
| *   The <a class="reference-link" href="Note%20Tree.md">Note Tree</a> can be collapsed by pressing the  button at the bottom of the <a class="reference-link" href="Launch%20Bar.md">Launch Bar</a>. | ||||
| *   The <a class="reference-link" href="Global%20menu.md">Global menu</a> can be accessed via the  icon at the top of the <a class="reference-link" href="Launch%20Bar.md">Launch Bar</a>. | ||||
|  | ||||
|  | ||||
|  | ||||
| @@ -19,16 +19,16 @@ The vertical layout is Trilium's original layout: | ||||
|  | ||||
| The horizontal layout is a more traditional layout, since it bears similarity with other applications. In this mode: | ||||
|  | ||||
| *   The [Launcher Bar](Launch%20Bar.md) is at the top of the screen, with the buttons laid horizontally. | ||||
| *   The <a class="reference-link" href="Launch%20Bar.md">Launch Bar</a> is at the top of the screen, with the buttons laid horizontally. | ||||
| *   The tab bar is at the top of the screen, but now covers the entirety of the width, allowing for more tabs to be displayed at once. | ||||
| *   The [Quick search](../Navigation/Quick%20search.md) is now part of the [Launcher Bar](Launch%20Bar.md). It can be moved around according to preference and even removed if needed. | ||||
| *   The [Note Tree](Note%20Tree.md) can be collapsed by pressing the small  button to the left of the first tab. | ||||
| *   The [Global menu](Global%20menu.md) can be accessed via the  button at the end of the [Launcher Bar](Launch%20Bar.md). | ||||
| *   The <a class="reference-link" href="../Navigation/Quick%20search.md">Quick search</a> is now part of the <a class="reference-link" href="Launch%20Bar.md">Launch Bar</a>. It can be moved around according to preference and even removed if needed. | ||||
| *   The <a class="reference-link" href="Note%20Tree.md">Note Tree</a> can be collapsed by pressing the small  button to the left of the first tab. | ||||
| *   The <a class="reference-link" href="Global%20menu.md">Global menu</a> can be accessed via the  button at the end of the <a class="reference-link" href="Launch%20Bar.md">Launch Bar</a>. | ||||
|  | ||||
|  | ||||
|  | ||||
| ## Changing the layout | ||||
|  | ||||
| Go to [Settings](#root/_hidden/_lbRoot/_lbVisibleLaunchers/_lbSettings) and look for the _Appearance_ option on the left. Then look for the _Layout_ section, where there is the possibility to switch between the two available layouts. | ||||
| Go to <a class="reference-link" href="Options.md">Options</a> and look for the _Appearance_ option on the left. Then look for the _Layout_ section, where there is the possibility to switch between the two available layouts. | ||||
|  | ||||
| Selecting an option will immediately apply the new layout by reloading the window. | ||||
| @@ -17,7 +17,7 @@ Common request is to allow multiple users collaborate, share notes etc. So far I | ||||
|  | ||||
| *   it's a huge feature, or rather a Pandora's box of collaboration features like user management, permissions, conflict resolution, real-time editing of a note by multiple people etc. This would be a huge amount of work. Trilium Notes is project made mostly by one person in free time and that's unlikely to change in the future. | ||||
| *   given its size it would probably pivot the attention away from my main focus which is a personal note-taking | ||||
| *   the assumption that only single person has access to the app simplifies many things, or just outright makes them possible. In multi-user app, our [scripting](Note%20Types/Code/Scripts.md)support would be a XSS security hole, while with the single user assumption it's an endless customizable tool. | ||||
| *   the assumption that only single person has access to the app simplifies many things, or just outright makes them possible. In multi-user app, our [scripting](Note%20Types/Code/Scripting.md)support would be a XSS security hole, while with the single user assumption it's an endless customizable tool. | ||||
|  | ||||
| ## How to open multiple documents in one Trilium instance | ||||
|  | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
| # Backup | ||||
| Trilium supports simple backup scheme where it saves copy of the [document](#root/xjSsCcvVZf6H) on these events: | ||||
| Trilium supports simple backup scheme where it saves copy of the <a class="reference-link" href="../Advanced%20Usage/Database.md">Database</a> on these events: | ||||
|  | ||||
| *   once a day | ||||
| *   once a week | ||||
| @@ -8,9 +8,9 @@ Trilium supports simple backup scheme where it saves copy of the [document](#roo | ||||
|  | ||||
| So in total you'll have at most 4 backups from different points in time which should protect you from various problems. These backups are stored by default in `backup` directory placed in the [data directory](Data%20directory.md). | ||||
|  | ||||
| This is only very basic backup solution, and you're encouraged to add some better backup solution - e.g. backing up the [document](#root/xjSsCcvVZf6H) to cloud / different computer etc. | ||||
| This is only very basic backup solution, and you're encouraged to add some better backup solution - e.g. backing up the <a class="reference-link" href="../Advanced%20Usage/Database.md">Database</a> to cloud / different computer etc. | ||||
|  | ||||
| Note that [synchronization](Synchronization.md) provides also some backup capabilities by its nature of distributing the data to other computers. | ||||
| Note that <a class="reference-link" href="Synchronization.md">Synchronization</a> provides also some backup capabilities by its nature of distributing the data to other computers. | ||||
|  | ||||
| ## Restoring backup | ||||
|  | ||||
| @@ -18,7 +18,7 @@ Let's assume you want to restore the weekly backup, here's how to do it: | ||||
|  | ||||
| *   find [data directory](Data%20directory.md) Trilium uses - easy way is to open "About Trilium Notes" from "Menu" in upper left corner and looking at "data directory" | ||||
|     *   I'll refer to `~/trilium-data` as data directory from now on | ||||
| *   find `~/trilium-data/backup/backup-weekly.db` - this is the [document](#root/xjSsCcvVZf6H) backup | ||||
| *   find `~/trilium-data/backup/backup-weekly.db` - this is the <a class="reference-link" href="../Advanced%20Usage/Database.md">Database</a> backup | ||||
| *   at this point stop/kill Trilium | ||||
| *   delete `~/trilium-data/document.db`, `~/trilium-data/document.db-wal` and `~/trilium-data/document.db-shm` (latter two files are auto generated) | ||||
| *   copy and rename this `~/trilium-data/backup/backup-weekly.db` to `~/trilium-data/document.db` | ||||
|   | ||||
| @@ -31,4 +31,4 @@ Trilium decides automatically whether to use mobile or desktop frontend. If this | ||||
|  | ||||
| ## Scripting | ||||
|  | ||||
| You can alter the behavior with [scripts](../Note%20Types/Code/Scripts.md) just like for normal frontend. For script notes to be executed, they need to have labeled `#run=mobileStartup`. | ||||
| You can alter the behavior with [scripts](../Note%20Types/Code/Scripting.md) just like for normal frontend. For script notes to be executed, they need to have labeled `#run=mobileStartup`. | ||||
| @@ -25,17 +25,4 @@ It is possible to change the type of a note after it has been created via the _B | ||||
|  | ||||
| The following note types are supported by Trilium: | ||||
|  | ||||
| |     |     | | ||||
| | --- | --- | | ||||
| | <a class="reference-link" href="Note%20Types/Text.md">Text</a> | The default note type, which allows for rich text formatting, images, admonitions and right-to-left support. | | ||||
| | <a class="reference-link" href="Note%20Types/Code.md">Code</a> | Uses a mono-space font and can be used to store larger chunks of code or plain text than a text note, and has better syntax highlighting. | | ||||
| | <a class="reference-link" href="Note%20Types/Saved%20Search.md">Saved Search</a> | Stores the information about a search (the search text, criteria, etc.) for later use. Can be used for quick filtering of a large amount of notes, for example. The search can easily be triggered. | | ||||
| | <a class="reference-link" href="Note%20Types/Relation%20Map.md">Relation Map</a> | Allows easy creation of notes and relations between them. Can be used for mainly relational data such as a family tree. | | ||||
| | <a class="reference-link" href="Note%20Types/Note%20Map.md">Note Map</a> | Displays the relationships between the notes, whether via relations or their hierarchical structure. | | ||||
| | <a class="reference-link" href="Note%20Types/Render%20Note.md">Render Note</a> | Used in <a class="reference-link" href="Note%20Types/Code/Scripts.md">Scripts</a>, it displays the HTML content of another note. This allows displaying any kind of content, provided there is a script behind it to generate it. | | ||||
| | <a class="reference-link" href="Note%20Types/Book.md">Book</a> | Displays the children of the note either as a grid, a list, or for a more specialized case: a calendar. | | ||||
| | <a class="reference-link" href="Note%20Types/Mermaid%20Diagrams.md">Mermaid Diagrams</a> | Displays diagrams such as bar charts, flow charts, state diagrams, etc. Requires a bit of technical knowledge since the diagrams are written in a specialized format. | | ||||
| | <a class="reference-link" href="Note%20Types/Canvas.md">Canvas</a> | Allows easy drawing of sketches, diagrams, handwritten content. Uses the same technology behind [excalidraw.com](https://excalidraw.com). | | ||||
| | <a class="reference-link" href="Note%20Types/Web%20View.md">Web View</a> | Displays the content of an external web page, similar to a browser. | | ||||
| | <a class="reference-link" href="Note%20Types/Mind%20Map.md">Mind Map</a> | Easy for brainstorming ideas, by placing them in a hierarchical layout. | | ||||
| | <a class="reference-link" href="Note%20Types/Geo%20Map.md">Geo Map</a> | Displays the children of the note as a geographical map, one use-case would be to plan vacations. It even has basic support for tracks. Notes can also be created from it. | | ||||
| <figure class="table" style="width:100%;"><table class="ck-table-resized"><colgroup><col style="width:29.42%;"><col style="width:70.58%;"></colgroup><thead><tr><th>Note Type</th><th>Description</th></tr></thead><tbody><tr><td><a class="reference-link" href="Note%20Types/Text.md">Text</a></td><td>The default note type, which allows for rich text formatting, images, admonitions and right-to-left support.</td></tr><tr><td><a class="reference-link" href="Note%20Types/Code.md">Code</a></td><td>Uses a mono-space font and can be used to store larger chunks of code or plain text than a text note, and has better syntax highlighting.</td></tr><tr><td><a class="reference-link" href="Note%20Types/Saved%20Search.md">Saved Search</a></td><td>Stores the information about a search (the search text, criteria, etc.) for later use. Can be used for quick filtering of a large amount of notes, for example. The search can easily be triggered.</td></tr><tr><td><a class="reference-link" href="Note%20Types/Relation%20Map.md">Relation Map</a></td><td>Allows easy creation of notes and relations between them. Can be used for mainly relational data such as a family tree.</td></tr><tr><td><a class="reference-link" href="Note%20Types/Note%20Map.md">Note Map</a></td><td>Displays the relationships between the notes, whether via relations or their hierarchical structure.</td></tr><tr><td><a class="reference-link" href="Note%20Types/Render%20Note.md">Render Note</a></td><td>Used in <a class="reference-link" href="Note%20Types/Code/Scripting.md">Scripting</a>, it displays the HTML content of another note. This allows displaying any kind of content, provided there is a script behind it to generate it.</td></tr><tr><td><a class="reference-link" href="Note%20Types/Book.md">Book</a></td><td><p>Displays the children of the note either as a grid, a list, or for a more specialized case: a calendar.</p><p>Generally useful for easy reading of short notes.</p></td></tr><tr><td><a class="reference-link" href="Note%20Types/Mermaid%20Diagrams.md">Mermaid Diagrams</a></td><td>Displays diagrams such as bar charts, flow charts, state diagrams, etc. Requires a bit of technical knowledge since the diagrams are written in a specialized format.</td></tr><tr><td><a class="reference-link" href="Note%20Types/Canvas.md">Canvas</a></td><td>Allows easy drawing of sketches, diagrams, handwritten content. Uses the same technology behind <a href="https://excalidraw.com">excalidraw.com</a>.</td></tr><tr><td><a class="reference-link" href="Note%20Types/Web%20View.md">Web View</a></td><td>Displays the content of an external web page, similar to a browser.</td></tr><tr><td><a class="reference-link" href="Note%20Types/Mind%20Map.md">Mind Map</a></td><td>Easy for brainstorming ideas, by placing them in a hierarchical layout.</td></tr><tr><td><a class="reference-link" href="Note%20Types/Geo%20Map.md">Geo Map</a></td><td>Displays the children of the note as a geographical map, one use-case would be to plan vacations. It even has basic support for tracks. Notes can also be created from it.</td></tr><tr><td><a class="reference-link" href="Note%20Types/File.md">File</a></td><td>Represents an uploaded file such as PDFs, images, video or audio files.</td></tr></tbody></table></figure> | ||||
| @@ -5,7 +5,7 @@ This can be useful for a few things: | ||||
|  | ||||
| *   computer programmers can store code snippets as notes with syntax highlighting | ||||
| *   JavaScript code notes can be executed inside Trilium for some extra functionality | ||||
|     *   we call such JavaScript code notes "scripts" - see [Scripts](Code/Scripts.md) | ||||
|     *   we call such JavaScript code notes "scripts" - see [Scripts](Code/Scripting.md) | ||||
| *   JSON, XML etc. can be used as storage for structured data (typically used in conjunction with scripting) | ||||
|  | ||||
| For shorter snippets of code that can be embedded in [Text](Text.md) notes, see [Code blocks](Text/Developer-specific%20formatting/Code%20blocks.md). | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
| # Events | ||||
| [Script](Scripts.md) notes can be triggered by events. Note that these are backend events and thus relation need to point to the "JS backend" code note. | ||||
| [Script](Scripting.md) notes can be triggered by events. Note that these are backend events and thus relation need to point to the "JS backend" code note. | ||||
|  | ||||
| ## Global events | ||||
|  | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
| # Scripts | ||||
| Trilium supports creating [code notes](../Code.md), 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 [Script API](Script%20API.md) provide extra functionality. | ||||
| # Scripting | ||||
| Trilium supports creating <a class="reference-link" href="../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="Script%20API.md">Script API</a> provide extra functionality. | ||||
| 
 | ||||
| ## Scripting | ||||
| 
 | ||||
| @@ -12,7 +12,7 @@ So we have frontend and backend, each with their own set of responsibilities, bu | ||||
| 
 | ||||
| ## Use cases | ||||
| 
 | ||||
| *   <a class="reference-link" href="Scripts/New%20Task%20launcher%20button.md">"New Task" launcher button</a> | ||||
| *   <a class="reference-link" href="Scripting/New%20Task%20launcher%20button.md">"New Task" launcher button</a> | ||||
| 
 | ||||
| ## Action handler | ||||
| 
 | ||||
| Before Width: | Height: | Size: 491 B After Width: | Height: | Size: 491 B | 
							
								
								
									
										328
									
								
								src/public/app/doc_notes/en/User Guide/!!!meta.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										328
									
								
								src/public/app/doc_notes/en/User Guide/!!!meta.json
									
									
									
										generated
									
									
									
								
							| @@ -875,19 +875,26 @@ | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 20 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "cbkrhQjrkKrh", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 30 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "label", | ||||
|                                     "name": "shareAlias", | ||||
|                                     "value": "backup", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 20 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "wX4HbRucYSDD", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 40 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "cbkrhQjrkKrh", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 50 | ||||
|                                 } | ||||
|                             ], | ||||
|                             "format": "html", | ||||
| @@ -1056,6 +1063,13 @@ | ||||
|                                             "value": "bx bxs-layout", | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 40 | ||||
|                                         }, | ||||
|                                         { | ||||
|                                             "type": "relation", | ||||
|                                             "name": "internalLink", | ||||
|                                             "value": "4TIF1oA4VQRO", | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 50 | ||||
|                                         } | ||||
|                                     ], | ||||
|                                     "format": "html", | ||||
| @@ -1917,62 +1931,6 @@ | ||||
|                             "type": "text", | ||||
|                             "mime": "text/markdown", | ||||
|                             "attributes": [ | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "iPIMuisry3hd", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 10 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "6f9hih2hXXZk", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 20 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "CdNpE2pqjmI6", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 30 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "m523cpzocqaD", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 40 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "iRwzGnHPzonm", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 50 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "GTwFsgaA0lCt", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 60 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "IakOLONlIfGI", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 70 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "ODY7qQn5m2FT", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 80 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
| @@ -1993,6 +1951,62 @@ | ||||
|                                     "value": "bx bx-notepad", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 100 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "iPIMuisry3hd", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 110 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "grjYqerjn243", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 120 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "s1aBHPd79XYj", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 130 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "m523cpzocqaD", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 140 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "HcABDtFCkbFN", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 150 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "CdNpE2pqjmI6", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 160 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "IakOLONlIfGI", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 170 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "ODY7qQn5m2FT", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 180 | ||||
|                                 } | ||||
|                             ], | ||||
|                             "format": "html", | ||||
| @@ -2393,6 +2407,27 @@ | ||||
|                                             "value": "bx bxs-file-pdf", | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 30 | ||||
|                                         }, | ||||
|                                         { | ||||
|                                             "type": "relation", | ||||
|                                             "name": "internalLink", | ||||
|                                             "value": "wy8So3yZZlH9", | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 40 | ||||
|                                         }, | ||||
|                                         { | ||||
|                                             "type": "relation", | ||||
|                                             "name": "internalLink", | ||||
|                                             "value": "zEY4DaJG4YT5", | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 50 | ||||
|                                         }, | ||||
|                                         { | ||||
|                                             "type": "relation", | ||||
|                                             "name": "internalLink", | ||||
|                                             "value": "4TIF1oA4VQRO", | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 60 | ||||
|                                         } | ||||
|                                     ], | ||||
|                                     "format": "html", | ||||
| @@ -2439,27 +2474,6 @@ | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 10 | ||||
|                                         }, | ||||
|                                         { | ||||
|                                             "type": "relation", | ||||
|                                             "name": "internalLink", | ||||
|                                             "value": "iPIMuisry3hd", | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 20 | ||||
|                                         }, | ||||
|                                         { | ||||
|                                             "type": "relation", | ||||
|                                             "name": "internalLink", | ||||
|                                             "value": "6f9hih2hXXZk", | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 30 | ||||
|                                         }, | ||||
|                                         { | ||||
|                                             "type": "relation", | ||||
|                                             "name": "internalLink", | ||||
|                                             "value": "4TIF1oA4VQRO", | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 40 | ||||
|                                         }, | ||||
|                                         { | ||||
|                                             "type": "relation", | ||||
|                                             "name": "internalLink", | ||||
| @@ -2494,6 +2508,41 @@ | ||||
|                                             "value": "bx bx-edit-alt", | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 40 | ||||
|                                         }, | ||||
|                                         { | ||||
|                                             "type": "relation", | ||||
|                                             "name": "internalLink", | ||||
|                                             "value": "_optionsTextNotes", | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 80 | ||||
|                                         }, | ||||
|                                         { | ||||
|                                             "type": "relation", | ||||
|                                             "name": "internalLink", | ||||
|                                             "value": "_optionsCodeNotes", | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 90 | ||||
|                                         }, | ||||
|                                         { | ||||
|                                             "type": "relation", | ||||
|                                             "name": "internalLink", | ||||
|                                             "value": "iPIMuisry3hd", | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 100 | ||||
|                                         }, | ||||
|                                         { | ||||
|                                             "type": "relation", | ||||
|                                             "name": "internalLink", | ||||
|                                             "value": "6f9hih2hXXZk", | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 110 | ||||
|                                         }, | ||||
|                                         { | ||||
|                                             "type": "relation", | ||||
|                                             "name": "internalLink", | ||||
|                                             "value": "4TIF1oA4VQRO", | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 120 | ||||
|                                         } | ||||
|                                     ], | ||||
|                                     "format": "html", | ||||
| @@ -3957,6 +4006,13 @@ | ||||
|                             "value": "bx bx-edit", | ||||
|                             "isInheritable": false, | ||||
|                             "position": 10 | ||||
|                         }, | ||||
|                         { | ||||
|                             "type": "relation", | ||||
|                             "name": "internalLink", | ||||
|                             "value": "W8vYD3Q1zjCR", | ||||
|                             "isInheritable": false, | ||||
|                             "position": 180 | ||||
|                         } | ||||
|                     ], | ||||
|                     "format": "html", | ||||
| @@ -4924,20 +4980,13 @@ | ||||
|                                         "6f9hih2hXXZk", | ||||
|                                         "CdNpE2pqjmI6" | ||||
|                                     ], | ||||
|                                     "title": "Scripts", | ||||
|                                     "title": "Scripting", | ||||
|                                     "notePosition": 10, | ||||
|                                     "prefix": null, | ||||
|                                     "isExpanded": false, | ||||
|                                     "type": "text", | ||||
|                                     "mime": "text/markdown", | ||||
|                                     "attributes": [ | ||||
|                                         { | ||||
|                                             "type": "relation", | ||||
|                                             "name": "internalLink", | ||||
|                                             "value": "6f9hih2hXXZk", | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 10 | ||||
|                                         }, | ||||
|                                         { | ||||
|                                             "type": "relation", | ||||
|                                             "name": "internalLink", | ||||
| @@ -4986,12 +5035,19 @@ | ||||
|                                             "value": "scripts", | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 20 | ||||
|                                         }, | ||||
|                                         { | ||||
|                                             "type": "relation", | ||||
|                                             "name": "internalLink", | ||||
|                                             "value": "6f9hih2hXXZk", | ||||
|                                             "isInheritable": false, | ||||
|                                             "position": 80 | ||||
|                                         } | ||||
|                                     ], | ||||
|                                     "format": "html", | ||||
|                                     "dataFileName": "Scripts.html", | ||||
|                                     "dataFileName": "Scripting.html", | ||||
|                                     "attachments": [], | ||||
|                                     "dirFileName": "Scripts", | ||||
|                                     "dirFileName": "Scripting", | ||||
|                                     "children": [ | ||||
|                                         { | ||||
|                                             "isClone": false, | ||||
| @@ -8191,20 +8247,6 @@ | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 10 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "MI26XDLSAlCD", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 20 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "81SGnPGMk7Xc", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 30 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
| @@ -8212,13 +8254,6 @@ | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 40 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "H0mM1lTxF9JI", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 50 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
| @@ -8227,32 +8262,67 @@ | ||||
|                                     "position": 60 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "N4IDkixaDG9C", | ||||
|                                     "type": "label", | ||||
|                                     "name": "iconClass", | ||||
|                                     "value": "bx bx-code", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 70 | ||||
|                                     "position": 120 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "Wxt3vVlxlYLi", | ||||
|                                     "value": "iPIMuisry3hd", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 80 | ||||
|                                     "position": 150 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "MI26XDLSAlCD", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 160 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "6f9hih2hXXZk", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 170 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "81SGnPGMk7Xc", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 180 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "H0mM1lTxF9JI", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 190 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "N4IDkixaDG9C", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 200 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "0vhv7lsOLy82", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 210 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "relation", | ||||
|                                     "name": "internalLink", | ||||
|                                     "value": "8YBEPzcpUgxw", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 90 | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "type": "label", | ||||
|                                     "name": "iconClass", | ||||
|                                     "value": "bx bx-code", | ||||
|                                     "isInheritable": false, | ||||
|                                     "position": 120 | ||||
|                                     "position": 220 | ||||
|                                 } | ||||
|                             ], | ||||
|                             "format": "html", | ||||
|   | ||||
| @@ -13,7 +13,7 @@ | ||||
|        <h1 data-trilium-h1>Advanced Showcases</h1> | ||||
|  | ||||
|       <div class="ck-content"> | ||||
|         <p>Trilium offers advanced functionality through <a href="../Note%20Types/Code/Scripts.html">Scripts</a> and | ||||
|         <p>Trilium offers advanced functionality through <a href="../Note%20Types/Code/Scripting.html">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> | ||||
|   | ||||
| @@ -15,7 +15,7 @@ | ||||
|       <div class="ck-content"> | ||||
|         <p>Task Manager is a <a href="../Attributes/Promoted%20Attributes.html">promoted attributes</a> and | ||||
|           <a | ||||
|           href="../../Note%20Types/Code/Scripts.html">scripts</a>showcase present in the <a href="../Database.html">demo notes</a>.</p> | ||||
|           href="../../Note%20Types/Code/Scripting.html">scripts</a>showcase present in the <a href="../Database.html">demo notes</a>.</p> | ||||
|         <h2>Demo</h2> | ||||
|         <p> | ||||
|           <img src="../../Attachments/task-manager.png"> | ||||
| @@ -37,7 +37,7 @@ | ||||
|         <p>Task template defines several <a href="../Attributes/Promoted%20Attributes.html">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="../../Note%20Types/Code/Scripts.html">script</a> handles | ||||
|           run on attribute change. This <a href="../../Note%20Types/Code/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> | ||||
|   | ||||
| @@ -24,7 +24,7 @@ | ||||
|         <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="../../Note%20Types/Code/Scripts.html">script</a> can | ||||
|           a placeholder where a <a href="../../Note%20Types/Code/Scripting.html">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>. | ||||
|           In this example, it's the <code>Weight Tracker</code>'s child <code>Implementation</code>. | ||||
|   | ||||
| @@ -13,7 +13,7 @@ | ||||
|        <h1 data-trilium-h1>Custom Request Handler</h1> | ||||
|  | ||||
|       <div class="ck-content"> | ||||
|         <p>Trilium provides a mechanism for <a href="../Note%20Types/Code/Scripts.html">scripts</a> to | ||||
|         <p>Trilium provides a mechanism for <a href="../Note%20Types/Code/Scripting.html">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> | ||||
|   | ||||
| @@ -15,27 +15,31 @@ | ||||
|       <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 href="../Note%20Types.html">Note Types</a>.</p> | ||||
|           on the <a class="reference-link" href="../Note%20Types.html">Note Types</a>.</p> | ||||
|         <p>For example:</p> | ||||
|         <ul> | ||||
|           <li><a href="#root/_hidden/_options/_optionsTextNotes">Text Notes</a> are | ||||
|             represented internally as HTML, using the <a href="Technologies%20used/CKEditor.html">CKEditor</a> representation. | ||||
|           <li><a class="reference-link" href="../Note%20Types/Text.html">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 href="#root/_hidden/_options/_optionsCodeNotes">Code Notes</a> are | ||||
|           <li><a class="reference-link" href="../Note%20Types/Code.html">Code</a> notes are | ||||
|             plain text and are represented internally as-is.</li> | ||||
|           <li><a href="../Note%20Types/Geo%20Map.html">Geo map</a> notes contain | ||||
|             only minimal information (viewport, zoom) as a JSON.</li> | ||||
|           <li><a href="../Note%20Types/Canvas.html">Canvas</a> notes are represented | ||||
|             as JSON, with Trilium's own information alongside with <a href="Technologies%20used/Excalidraw.html">Excalidraw</a>'s | ||||
|             internal JSON representation format.</li> | ||||
|           <li><a href="../Note%20Types/Mind%20Map.html">Mind Map</a> notes are | ||||
|             represented as JSON, with the internal format of <a href="Technologies%20used/MindElixir.html">MindElixir</a>.</li> | ||||
|           <li><a class="reference-link" href="../Note%20Types/Geo%20Map.html">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 | ||||
|             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 | ||||
|             are represented as JSON, with the internal format of <a class="reference-link" | ||||
|             href="Technologies%20used/MindElixir.html">MindElixir</a>.</li> | ||||
|         </ul> | ||||
|         <p>Note that some information is also stored as <a href="../Attachments">Attachments</a>. | ||||
|           For example <a href="../Note%20Types/Canvas.html">Canvas</a> notes | ||||
|         <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 href="../Note%20Types/Mind%20Map.html">Mind Map</a> and | ||||
|           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> | ||||
| @@ -52,7 +56,7 @@ | ||||
| </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 href="../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20buttons.html">Note buttons</a> and | ||||
|           menu in <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20buttons.html">Note buttons</a> and | ||||
|           selecting <em>Note source</em>.</p> | ||||
|         <p> | ||||
|           <img src="Note source_image.png"> | ||||
|   | ||||
| @@ -16,30 +16,15 @@ | ||||
|         <p>Note is a central entity in Trilium. Main attributes of note are title | ||||
|           and content.</p> | ||||
|         <h3>Note types</h3> | ||||
|         <ul> | ||||
|           <li><a href="../Note%20Types/Text.html">text note</a> - this is default note | ||||
|             type which allows you to put rich text, images etc.</li> | ||||
|           <li><a href="../Note%20Types/Code.html">code note</a> - some kind of formal | ||||
|             code, typically programming language (e.g. JavaScript) or data structure | ||||
|             (e.g. JSON)</li> | ||||
|           <li><a href="https://github.com/TriliumNext/Notes/wiki/Images">image note</a> - | ||||
|             represents single image</li> | ||||
|           <li>file note - represents uploaded file (e.g. docx MS Word document).</li> | ||||
|           <li>render HTML note - this works as an output screen of attached <a href="../Note%20Types/Code/Scripts.html">scripts</a> | ||||
|           </li> | ||||
|           <li><a href="../Note%20Types/Saved%20Search.html">saved search</a> note - contains | ||||
|             saved search query and dynamically displays result of the search as its | ||||
|             sub-notes</li> | ||||
|           <li><a href="../Note%20Types/Relation%20Map.html">relation map</a> note - visualizes | ||||
|             notes and their relations</li> | ||||
|           <li><a href="../Note%20Types/Book.html">book note</a> - displays its children | ||||
|             notes, useful for reading many short notes</li> | ||||
|           <li>mermaid - create diagrams and flowcharts using <a href="https://github.com/mermaid-js/mermaid">mermaid.js ↗</a> | ||||
|           </li> | ||||
|           <li><a href="#root/fKYGY3OOo5d1">canvas note</a> - allows hand drawn notes | ||||
|             and basic diagraming on an infinite canvas using <a href="https://github.com/excalidraw/excalidraw">excalidraw ↗</a> | ||||
|           </li> | ||||
|         </ul> | ||||
|         <p>The main note type is a rich-text note type called <a class="reference-link" | ||||
|           href="../Note%20Types/Text.html">Text</a>. For diagrams and drawing there | ||||
|           is <a class="reference-link" href="../Note%20Types/Canvas.html">Canvas</a> and  | ||||
|           <a | ||||
|           class="reference-link" href="../Note%20Types/Mermaid%20Diagrams.html">Mermaid Diagrams</a>.</p> | ||||
|         <p>There are also more complex note types such as <a class="reference-link" | ||||
|           href="../Note%20Types/Saved%20Search.html">Saved Search</a>, <a class="reference-link" | ||||
|           href="../Note%20Types/Render%20Note.html">Render Note</a> that usually | ||||
|           go hand-in-hand with <a class="reference-link" href="../Note%20Types/Code/Scripting.html">Scripting</a>.</p> | ||||
|         <p>In Trilium there's no specific "folder" note type. Any note can have children | ||||
|           and thus be a folder.</p> | ||||
|         <h3>Root note</h3> | ||||
| @@ -47,7 +32,8 @@ | ||||
|           tree. All other notes are placed below it in the structure.</p> | ||||
|         <h3>Tree structure</h3> | ||||
|         <p>Importantly, note itself doesn't carry information on its placement in | ||||
|           note tree. See <a href="Notes/Cloning%20Notes.html">cloning</a> for details.</p> | ||||
|           note tree. See <a class="reference-link" href="Notes/Cloning%20Notes.html">Cloning Notes</a> for | ||||
|           details.</p> | ||||
|         <p>Tree structure of notes can resemble file system - but compared to that | ||||
|           notes in Trilium can act as both file and directory - meaning that note | ||||
|           can both have its own content and have children. "Leaf note" is a note | ||||
| @@ -70,7 +56,8 @@ | ||||
|           - the solution is then undelete in the reverse order of your deletion.</p> | ||||
|         <p>After the 7 days (configurable) the notes will be "erased" - their title, | ||||
|           content, revisions and attributes will be erased, and it will not be possible | ||||
|           anymore to recover them (unless you restore <a href="../Installation%20%26%20Setup/Backup.html">backup</a>).</p> | ||||
|           anymore to recover them (unless you restore a <a class="reference-link" | ||||
|           href="../Installation%20%26%20Setup/Backup.html">Backup</a>).</p> | ||||
|         <h2>See also</h2> | ||||
|         <ul> | ||||
|           <li><a href="Notes/Read-Only%20Notes.html">Read-only note</a> | ||||
|   | ||||
| @@ -16,10 +16,10 @@ | ||||
|         <p>A <a href="../Notes.html">note</a> in Trilium can <em>own</em> one or more | ||||
|           attachments, which can be either images or files. These attachments can | ||||
|           be displayed or linked within the note that owns them.</p> | ||||
|         <p>This can be especially useful to include dependencies for your <a href="../../Note%20Types/Code/Scripts.html">scripts</a>. | ||||
|         <p>This can be especially useful to include dependencies for your <a href="../../Note%20Types/Code/Scripting.html">scripts</a>. | ||||
|           The <a class="reference-link" href="../../Advanced%20Usage/Advanced%20Showcases/Weight%20Tracker.html">Weight Tracker</a> shows | ||||
|           how to use <a href="https://chartjs.org/">chartjs</a> which is attached to | ||||
|           the <a href="#root/HcUYTojFohtb">script note</a>.</p> | ||||
|           the script note.</p> | ||||
|         <p>Each note exclusively owns its attachments, meaning attachments cannot | ||||
|           be shared or linked from one note to another. If an attachment link is | ||||
|           copied to a different note, the attachment itself is duplicated, and the | ||||
|   | ||||
| @@ -37,7 +37,7 @@ | ||||
|         <p>Should you encounter any visual issues in the resulting PDF file (e.g. | ||||
|           a table does not fit properly, there is cut off text, etc.) feel free to | ||||
|           <a | ||||
|           href="#root/OeKBfN6JbMIq/jRV1MPt4mNSP/hrC6xn7hnDq5">report the issue</a>. In this case, it's best to offer a sample note (click | ||||
|           href="../../Troubleshooting/Reporting%20issues.html">report the issue</a>. In this case, it's best to offer a sample note (click | ||||
|             on the | ||||
|             <img src="1_Export as PDF_image.png">button, select Export note → This note and all of its descendants → HTML | ||||
|             in ZIP archive). Make sure not to accidentally leak any personal information.</p> | ||||
| @@ -45,15 +45,16 @@ | ||||
|         <p>When exporting to PDF, there are no customizable settings such as page | ||||
|           orientation, size, etc. However, it is possible to specify a given note | ||||
|           to be printed as a PDF in landscape mode by adding the <code>#printLandscape</code> attribute | ||||
|           to it (see <a href="#root/9QRytp0ZYFIf/PnO38wN0ffOA">[missing note]</a>).</p> | ||||
|           to it (see <a class="reference-link" href="../../Advanced%20Usage/Attributes.html">Attributes</a>).</p> | ||||
|         <h2>Page size</h2> | ||||
|         <p>By default, the resulting PDF will be in Letter format. It is possible | ||||
|           to adjust it to another page size via the <code>#printPageSize</code> attribute, | ||||
|           with one of the following values: <code>A0</code>, <code>A1</code>, <code>A2</code>, <code>A3</code>, <code>A4</code>, <code>A5</code>, <code>A6</code>, <code>Legal</code>, <code>Letter</code>, <code>Tabloid</code>, <code>Ledger</code>.</p> | ||||
|         <h2>Keyboard shortcut</h2> | ||||
|         <p>It's possible to trigger the export to PDF from the keyboard by going | ||||
|           to <em>Keyboard shortcuts</em> and assigning a key combination | ||||
|           for the <code>exportAsPdf</code> action.</p> | ||||
|           to <em>Keyboard shortcuts</em> in <a class="reference-link" | ||||
|           href="../UI%20Elements/Options.html">Options</a> and assigning a key | ||||
|           combination for the <code>exportAsPdf</code> action.</p> | ||||
|       </div> | ||||
|     </div> | ||||
|   </body> | ||||
|   | ||||
| @@ -13,9 +13,9 @@ | ||||
|        <h1 data-trilium-h1>Read-Only Notes</h1> | ||||
|  | ||||
|       <div class="ck-content"> | ||||
|         <p>Some note types such as <a href="../../Note%20Types/Text.html">Text</a> and  | ||||
|         <p>Some note types such as <a class="reference-link" href="../../Note%20Types/Text.html">Text</a> and  | ||||
|           <a | ||||
|           href="../../Note%20Types/Code.html">Code</a> notes in Trilium can be set to read-only. When a note is | ||||
|           class="reference-link" href="../../Note%20Types/Code.html">Code</a> notes in Trilium can be set to read-only. When a note is | ||||
|             in read-only mode, it is presented to the user in a non-editable view, | ||||
|             with the option to switch to editing mode if needed.</p> | ||||
|         <h2>Automatic read-only mode</h2> | ||||
| @@ -25,8 +25,9 @@ | ||||
|         <p>This behavior can be disabled on a per-note basis, by following the instructions | ||||
|           of the next section.</p> | ||||
|         <p>In addition, it's possible to change the number of characters at which | ||||
|           the automatic read-only mode will trigger in <a href="../UI%20Elements/Options.html">Options</a> by | ||||
|           going to the options for <a class="reference-link" href="#root/_hidden/_options/_optionsTextNotes">Text Notes</a> and  | ||||
|           the automatic read-only mode will trigger in <a class="reference-link" | ||||
|           href="../UI%20Elements/Options.html">Options</a> by going to the options | ||||
|           for <a class="reference-link" href="#root/_hidden/_options/_optionsTextNotes">Text Notes</a> and  | ||||
|           <a | ||||
|           class="reference-link" href="#root/_hidden/_options/_optionsCodeNotes">Code Notes</a>.</p> | ||||
|         <h2>Changing a note's read-only behavior</h2> | ||||
| @@ -36,11 +37,13 @@ | ||||
|         <ul> | ||||
|           <li><strong>Auto</strong> | ||||
|             <br>This is the default behavior in which the note will be editable by default, | ||||
|             unless it becomes large enough to trigger read-only mode.</li> | ||||
|             unless it becomes large enough to trigger read-only mode. | ||||
|             <br> </li> | ||||
|           <li><strong>Read-only</strong> | ||||
|             <br>The note will be always marked as read-only, regardless of its size. Nevertheless, | ||||
|             it's still possible to temporarily edit the note if needed. This is generally | ||||
|             useful for notes that are not prone to change.</li> | ||||
|             useful for notes that are not prone to change. | ||||
|             <br> </li> | ||||
|           <li><strong>Always Editable</strong> | ||||
|             <br>This option will bypass the automatic read-only activation for this particular | ||||
|             note. It's useful for large notes that are frequently edited.</li> | ||||
|   | ||||
| @@ -99,7 +99,7 @@ body .CodeMirror { | ||||
|           shared with other users. However, be cautious when importing themes from | ||||
|           untrusted sources, as they may contain executable scripts that could pose | ||||
|           security risks.</p> | ||||
|         <p>An example user theme, <em>Steel Blue</em>, is available in the <a href="#root/xjSsCcvVZf6H">demo document</a>.</p> | ||||
|         <p>An example user theme, <em>Steel Blue</em>, is available in the demo document.</p> | ||||
|         <p> | ||||
|           <img src="../Attachments/steel-blue.png" alt="Steel Blue Theme"> | ||||
|         </p> | ||||
| @@ -111,8 +111,8 @@ body .CodeMirror { | ||||
|         <h3>Applying Custom CSS</h3> | ||||
|         <p>To use custom CSS:</p> | ||||
|         <ol> | ||||
|           <li><strong>Create a CSS Code Note</strong>: Create a new <a href="../Note%20Types/Code.html">code note</a> with | ||||
|             the <code>CSS</code> type.</li> | ||||
|           <li><strong>Create a CSS Code Note</strong>: Create a new <a class="reference-link" | ||||
|             href="../Note%20Types/Code.html">Code</a> note with the <code>CSS</code> type.</li> | ||||
|           <li><strong>Add the</strong>  <code>appCss</code>  <strong>Label</strong>: Annotate | ||||
|             the note with the <code>#appCss</code>  <a href="../Advanced%20Usage/Attributes.html">label</a>.</li> | ||||
|           <li><strong>Write Your CSS</strong>: Add your custom CSS rules to the note.</li> | ||||
|   | ||||
| @@ -84,7 +84,7 @@ | ||||
|             <p><strong>Script Launcher</strong> | ||||
|               <br>An advanced launcher which will run a script upon pressing. See  | ||||
|               <a | ||||
|               href="../../Note%20Types/Code/Scripts.html">Scripts</a> for more information.</p> | ||||
|               href="../../Note%20Types/Code/Scripting.html">Scripts</a> for more information.</p> | ||||
|             <ol> | ||||
|               <li>Set <code>script</code> to point to the desired script to run.</li> | ||||
|               <li>Optionally, set a <code>keyboardShortcut</code> to trigger the launcher.</li> | ||||
|   | ||||
| @@ -18,17 +18,19 @@ | ||||
|         <h3>Vertical layout</h3> | ||||
|         <p>The vertical layout is Trilium's original layout:</p> | ||||
|         <ul> | ||||
|           <li>The <a href="Launch%20Bar.html">Launcher Bar</a> is positioned | ||||
|             on the left side of the screen, with buttons being laid out vertically.</li> | ||||
|           <li>The tab bar is at the top, but to the right of the <a href="Note%20Tree.html">Note Tree</a>.</li> | ||||
|           <li>The <a href="../Navigation/Quick%20search.html">Quick search</a> is | ||||
|             at the top of the <a href="Note%20Tree.html">Note Tree</a>.</li> | ||||
|           <li>The <a href="Note%20Tree.html">Note Tree</a> can be collapsed | ||||
|             by pressing the | ||||
|             <img src="5_Vertical and horizontal la.png">button at the bottom of the <a href="Launch%20Bar.html">Launcher Bar</a>.</li> | ||||
|           <li>The <a href="Global%20menu.html">Global menu</a> can be accessed | ||||
|             via the | ||||
|             <img src="4_Vertical and horizontal la.png">icon at the top of the <a href="Launch%20Bar.html">Launcher Bar</a>.</li> | ||||
|           <li>The <a class="reference-link" href="Launch%20Bar.html">Launch Bar</a> is | ||||
|             positioned on the left side of the screen, with buttons being laid out | ||||
|             vertically.</li> | ||||
|           <li>The tab bar is at the top, but to the right of the <a class="reference-link" | ||||
|             href="Note%20Tree.html">Note Tree</a>.</li> | ||||
|           <li>The <a class="reference-link" href="../Navigation/Quick%20search.html">Quick search</a> is | ||||
|             at the top of the <a class="reference-link" href="Note%20Tree.html">Note Tree</a>.</li> | ||||
|           <li>The <a class="reference-link" href="Note%20Tree.html">Note Tree</a> can | ||||
|             be collapsed by pressing the | ||||
|             <img src="5_Vertical and horizontal la.png">button at the bottom of the <a class="reference-link" href="Launch%20Bar.html">Launch Bar</a>.</li> | ||||
|           <li>The <a class="reference-link" href="Global%20menu.html">Global menu</a> can | ||||
|             be accessed via the | ||||
|             <img src="4_Vertical and horizontal la.png">icon at the top of the <a class="reference-link" href="Launch%20Bar.html">Launch Bar</a>.</li> | ||||
|         </ul> | ||||
|         <p> | ||||
|           <img src="3_Vertical and horizontal la.png"> | ||||
| @@ -37,25 +39,25 @@ | ||||
|         <p>The horizontal layout is a more traditional layout, since it bears similarity | ||||
|           with other applications. In this mode:</p> | ||||
|         <ul> | ||||
|           <li>The <a href="Launch%20Bar.html">Launcher Bar</a> is at the top | ||||
|             of the screen, with the buttons laid horizontally.</li> | ||||
|           <li>The <a class="reference-link" href="Launch%20Bar.html">Launch Bar</a> is | ||||
|             at the top of the screen, with the buttons laid horizontally.</li> | ||||
|           <li>The tab bar is at the top of the screen, but now covers the entirety of | ||||
|             the width, allowing for more tabs to be displayed at once.</li> | ||||
|           <li>The <a href="../Navigation/Quick%20search.html">Quick search</a> is | ||||
|             now part of the <a href="Launch%20Bar.html">Launcher Bar</a>. It can | ||||
|             be moved around according to preference and even removed if needed.</li> | ||||
|           <li>The <a href="Note%20Tree.html">Note Tree</a> can be collapsed | ||||
|             by pressing the small | ||||
|           <li>The <a class="reference-link" href="../Navigation/Quick%20search.html">Quick search</a> is | ||||
|             now part of the <a class="reference-link" href="Launch%20Bar.html">Launch Bar</a>. | ||||
|             It can be moved around according to preference and even removed if needed.</li> | ||||
|           <li>The <a class="reference-link" href="Note%20Tree.html">Note Tree</a> can | ||||
|             be collapsed by pressing the small | ||||
|             <img src="1_Vertical and horizontal la.png">button to the left of the first tab.</li> | ||||
|           <li>The <a href="Global%20menu.html">Global menu</a> can be accessed | ||||
|             via the | ||||
|             <img src="Vertical and horizontal la.png">button at the end of the <a href="Launch%20Bar.html">Launcher Bar</a>.</li> | ||||
|           <li>The <a class="reference-link" href="Global%20menu.html">Global menu</a> can | ||||
|             be accessed via the | ||||
|             <img src="Vertical and horizontal la.png">button at the end of the <a class="reference-link" href="Launch%20Bar.html">Launch Bar</a>.</li> | ||||
|         </ul> | ||||
|         <p> | ||||
|           <img src="2_Vertical and horizontal la.png"> | ||||
|         </p> | ||||
|         <h2>Changing the layout</h2> | ||||
|         <p>Go to <a href="#root/_hidden/_lbRoot/_lbVisibleLaunchers/_lbSettings">Settings</a> and | ||||
|         <p>Go to <a class="reference-link" href="Options.html">Options</a> and | ||||
|           look for the <em>Appearance</em> option on the left. Then look for the <em>Layout</em> section, | ||||
|           where there is the possibility to switch between the two available layouts.</p> | ||||
|         <p>Selecting an option will immediately apply the new layout by reloading | ||||
|   | ||||
| @@ -36,7 +36,7 @@ | ||||
|           <li>the assumption that only single person has access to the app simplifies | ||||
|             many things, or just outright makes them possible. In multi-user app, our | ||||
|             <a | ||||
|             href="Note%20Types/Code/Scripts.html">scripting</a>support would be a XSS security hole, while with the single | ||||
|             href="Note%20Types/Code/Scripting.html">scripting</a>support would be a XSS security hole, while with the single | ||||
|               user assumption it's an endless customizable tool.</li> | ||||
|         </ul> | ||||
|         <h2>How to open multiple documents in one Trilium instance</h2> | ||||
|   | ||||
| @@ -13,8 +13,9 @@ | ||||
|        <h1 data-trilium-h1>Backup</h1> | ||||
|  | ||||
|       <div class="ck-content"> | ||||
|         <p>Trilium supports simple backup scheme where it saves copy of the <a href="#root/xjSsCcvVZf6H">document</a> on | ||||
|           these events:</p> | ||||
|         <p>Trilium supports simple backup scheme where it saves copy of the  | ||||
|           <a | ||||
|           class="reference-link" href="../Advanced%20Usage/Database.html">Database</a> on these events:</p> | ||||
|         <ul> | ||||
|           <li>once a day</li> | ||||
|           <li>once a week</li> | ||||
| @@ -25,11 +26,12 @@ | ||||
|           which should protect you from various problems. These backups are stored | ||||
|           by default in <code>backup</code> directory placed in the <a href="Data%20directory.html">data directory</a>.</p> | ||||
|         <p>This is only very basic backup solution, and you're encouraged to add | ||||
|           some better backup solution - e.g. backing up the <a href="#root/xjSsCcvVZf6H">document</a> to | ||||
|           cloud / different computer etc.</p> | ||||
|         <p>Note that <a href="Synchronization.html">synchronization</a> provides also | ||||
|           some backup capabilities by its nature of distributing the data to other | ||||
|           computers.</p> | ||||
|           some better backup solution - e.g. backing up the <a class="reference-link" | ||||
|           href="../Advanced%20Usage/Database.html">Database</a> to cloud / different | ||||
|           computer etc.</p> | ||||
|         <p>Note that <a class="reference-link" href="Synchronization.html">Synchronization</a> provides | ||||
|           also some backup capabilities by its nature of distributing the data to | ||||
|           other computers.</p> | ||||
|         <h2>Restoring backup</h2> | ||||
|         <p>Let's assume you want to restore the weekly backup, here's how to do it:</p> | ||||
|         <ul> | ||||
| @@ -40,9 +42,9 @@ | ||||
|               <li>I'll refer to <code>~/trilium-data</code> as data directory from now on</li> | ||||
|             </ul> | ||||
|           </li> | ||||
|           <li>find <code>~/trilium-data/backup/backup-weekly.db</code> - this is the | ||||
|           <li>find <code>~/trilium-data/backup/backup-weekly.db</code> - this is the  | ||||
|             <a | ||||
|             href="#root/xjSsCcvVZf6H">document</a>backup</li> | ||||
|             class="reference-link" href="../Advanced%20Usage/Database.html">Database</a> backup</li> | ||||
|           <li>at this point stop/kill Trilium</li> | ||||
|           <li>delete <code>~/trilium-data/document.db</code>, <code>~/trilium-data/document.db-wal</code> and <code>~/trilium-data/document.db-shm</code> (latter | ||||
|             two files are auto generated)</li> | ||||
|   | ||||
| @@ -47,7 +47,7 @@ | ||||
|           If this is not appropriate, you can use <code>?mobile</code> or <code>?desktop</code> query | ||||
|           param on <strong>login</strong> page (Note: you might need to log out).</p> | ||||
|         <h2>Scripting</h2> | ||||
|         <p>You can alter the behavior with <a href="../Note%20Types/Code/Scripts.html">scripts</a> just | ||||
|         <p>You can alter the behavior with <a href="../Note%20Types/Code/Scripting.html">scripts</a> just | ||||
|           like for normal frontend. For script notes to be executed, they need to | ||||
|           have labeled <code>#run=mobileStartup</code>.</p> | ||||
|       </div> | ||||
|   | ||||
| @@ -46,11 +46,17 @@ | ||||
|           note is empty. Can also be used to edit the <a href="Advanced%20Usage/Note%20source.html">source of a note</a>.</p> | ||||
|         <h2>Supported note types</h2> | ||||
|         <p>The following note types are supported by Trilium:</p> | ||||
|         <table> | ||||
|         <figure class="table" | ||||
|         style="width:100%;"> | ||||
|           <table class="ck-table-resized"> | ||||
|             <colgroup> | ||||
|               <col style="width:29.42%;"> | ||||
|                 <col style="width:70.58%;"> | ||||
|             </colgroup> | ||||
|             <thead> | ||||
|               <tr> | ||||
|               <th></th> | ||||
|               <th></th> | ||||
|                 <th>Note Type</th> | ||||
|                 <th>Description</th> | ||||
|               </tr> | ||||
|             </thead> | ||||
|             <tbody> | ||||
| @@ -88,15 +94,18 @@ | ||||
|               <tr> | ||||
|                 <td><a class="reference-link" href="Note%20Types/Render%20Note.html">Render Note</a> | ||||
|                 </td> | ||||
|               <td>Used in <a class="reference-link" href="Note%20Types/Code/Scripts.html">Scripts</a>, | ||||
|                 <td>Used in <a class="reference-link" href="Note%20Types/Code/Scripting.html">Scripting</a>, | ||||
|                   it displays the HTML content of another note. This allows displaying any | ||||
|                   kind of content, provided there is a script behind it to generate it.</td> | ||||
|               </tr> | ||||
|               <tr> | ||||
|                 <td><a class="reference-link" href="Note%20Types/Book.html">Book</a> | ||||
|                 </td> | ||||
|               <td>Displays the children of the note either as a grid, a list, or for a more | ||||
|                 specialized case: a calendar.</td> | ||||
|                 <td> | ||||
|                   <p>Displays the children of the note either as a grid, a list, or for a more | ||||
|                     specialized case: a calendar.</p> | ||||
|                   <p>Generally useful for easy reading of short notes.</p> | ||||
|                 </td> | ||||
|               </tr> | ||||
|               <tr> | ||||
|                 <td><a class="reference-link" href="Note%20Types/Mermaid%20Diagrams.html">Mermaid Diagrams</a> | ||||
| @@ -128,8 +137,14 @@ | ||||
|                   would be to plan vacations. It even has basic support for tracks. Notes | ||||
|                   can also be created from it.</td> | ||||
|               </tr> | ||||
|               <tr> | ||||
|                 <td><a class="reference-link" href="Note%20Types/File.html">File</a> | ||||
|                 </td> | ||||
|                 <td>Represents an uploaded file such as PDFs, images, video or audio files.</td> | ||||
|               </tr> | ||||
|             </tbody> | ||||
|           </table> | ||||
|         </figure> | ||||
|       </div> | ||||
|     </div> | ||||
|   </body> | ||||
|   | ||||
| @@ -21,7 +21,7 @@ | ||||
|           <li>computer programmers can store code snippets as notes with syntax highlighting</li> | ||||
|           <li>JavaScript code notes can be executed inside Trilium for some extra functionality | ||||
|             <ul> | ||||
|               <li>we call such JavaScript code notes "scripts" - see <a href="Code/Scripts.html">Scripts</a> | ||||
|               <li>we call such JavaScript code notes "scripts" - see <a href="Code/Scripting.html">Scripts</a> | ||||
|               </li> | ||||
|             </ul> | ||||
|           </li> | ||||
|   | ||||
| @@ -13,7 +13,7 @@ | ||||
|        <h1 data-trilium-h1>Events</h1> | ||||
|  | ||||
|       <div class="ck-content"> | ||||
|         <p><a href="Scripts.html">Script</a> notes can be triggered by events. Note | ||||
|         <p><a href="Scripting.html">Script</a> notes can be triggered by events. Note | ||||
|           that these are backend events and thus relation need to point to the "JS | ||||
|           backend" code note.</p> | ||||
|         <h2>Global events</h2> | ||||
|   | ||||
| @@ -5,18 +5,18 @@ | ||||
|     <meta name="viewport" content="width=device-width, initial-scale=1"> | ||||
|     <link rel="stylesheet" href="../../../style.css"> | ||||
|     <base target="_parent"> | ||||
|     <title data-trilium-title>Scripts</title> | ||||
|     <title data-trilium-title>Scripting</title> | ||||
|   </head> | ||||
|    | ||||
|   <body> | ||||
|     <div class="content"> | ||||
|        <h1 data-trilium-h1>Scripts</h1> | ||||
|        <h1 data-trilium-h1>Scripting</h1> | ||||
| 
 | ||||
|       <div class="ck-content"> | ||||
|         <p>Trilium supports creating <a href="../Code.html">code notes</a>, 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 href="Script%20API.html">Script API</a> provide | ||||
|         <p>Trilium supports creating <a class="reference-link" href="../Code.html">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="Script%20API.html">Script API</a> provide | ||||
|           extra functionality.</p> | ||||
|         <h2>Scripting</h2> | ||||
|         <p>To go further I must explain basic architecture of Trilium - in its essence | ||||
| @@ -33,7 +33,7 @@ | ||||
|           we're onto something.</p> | ||||
|         <h2>Use cases</h2> | ||||
|         <ul> | ||||
|           <li><a class="reference-link" href="Scripts/New%20Task%20launcher%20button.html">"New Task" launcher button</a> | ||||
|           <li><a class="reference-link" href="Scripting/New%20Task%20launcher%20button.html">"New Task" launcher button</a> | ||||
|           </li> | ||||
|         </ul> | ||||
|         <h2>Action handler</h2> | ||||
| Before Width: | Height: | Size: 491 B After Width: | Height: | Size: 491 B | 
| @@ -249,9 +249,9 @@ | ||||
|               </li> | ||||
|               <li><a href="User%20Guide/Note%20Types/Code.html" target="detail">Code</a> | ||||
|                 <ul> | ||||
|                   <li><a href="User%20Guide/Note%20Types/Code/Scripts.html" target="detail">Scripts</a> | ||||
|                   <li><a href="User%20Guide/Note%20Types/Code/Scripting.html" target="detail">Scripting</a> | ||||
|                     <ul> | ||||
|                       <li><a href="User%20Guide/Note%20Types/Code/Scripts/New%20Task%20launcher%20button.html" | ||||
|                       <li><a href="User%20Guide/Note%20Types/Code/Scripting/New%20Task%20launcher%20button.html" | ||||
|                         target="detail">"New Task" launcher button</a> | ||||
|                       </li> | ||||
|                     </ul> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user