diff --git a/docs/User Guide/!!!meta.json b/docs/User Guide/!!!meta.json index 09da4fd36..0c39d3095 100644 --- a/docs/User Guide/!!!meta.json +++ b/docs/User Guide/!!!meta.json @@ -634,249 +634,6 @@ } ] }, - { - "isClone": false, - "noteId": "6f9hih2hXXZk", - "notePath": [ - "pOsGYCXsbNQG", - "tC7s2alapj8V", - "6f9hih2hXXZk" - ], - "title": "Code Notes", - "notePosition": 60, - "prefix": null, - "isExpanded": false, - "type": "text", - "mime": "text/markdown", - "attributes": [ - { - "type": "relation", - "name": "internalLink", - "value": "CdNpE2pqjmI6", - "isInheritable": false, - "position": 10 - }, - { - "type": "label", - "name": "shareAlias", - "value": "code-notes", - "isInheritable": false, - "position": 20 - } - ], - "format": "markdown", - "dataFileName": "Code Notes.md", - "attachments": [ - { - "attachmentId": "hajUVeLs3EOM", - "title": "image.png", - "role": "image", - "mime": "image/jpg", - "position": 10, - "dataFileName": "Code Notes_image.png" - }, - { - "attachmentId": "OTcapNOcNaBL", - "title": "image.png", - "role": "image", - "mime": "image/jpg", - "position": 10, - "dataFileName": "1_Code Notes_image.png" - } - ], - "dirFileName": "Code Notes", - "children": [ - { - "isClone": false, - "noteId": "CdNpE2pqjmI6", - "notePath": [ - "pOsGYCXsbNQG", - "tC7s2alapj8V", - "6f9hih2hXXZk", - "CdNpE2pqjmI6" - ], - "title": "Scripts", - "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", - "value": "GLks18SNjxmC", - "isInheritable": false, - "position": 20 - }, - { - "type": "relation", - "name": "internalLink", - "value": "zEY4DaJG4YT5", - "isInheritable": false, - "position": 30 - }, - { - "type": "relation", - "name": "internalLink", - "value": "5668rwcirq1t", - "isInheritable": false, - "position": 40 - }, - { - "type": "relation", - "name": "internalLink", - "value": "GPERMystNGTB", - "isInheritable": false, - "position": 50 - }, - { - "type": "relation", - "name": "imageLink", - "value": "DVJl4l3T8EG2", - "isInheritable": false, - "position": 60 - }, - { - "type": "relation", - "name": "internalLink", - "value": "wX4HbRucYSDD", - "isInheritable": false, - "position": 70 - }, - { - "type": "relation", - "name": "internalLink", - "value": "RDslemsQ6gCp", - "isInheritable": false, - "position": 80 - }, - { - "type": "label", - "name": "shareAlias", - "value": "scripts", - "isInheritable": false, - "position": 20 - } - ], - "format": "markdown", - "dataFileName": "Scripts.md", - "attachments": [] - }, - { - "isClone": false, - "noteId": "GLks18SNjxmC", - "notePath": [ - "pOsGYCXsbNQG", - "tC7s2alapj8V", - "6f9hih2hXXZk", - "GLks18SNjxmC" - ], - "title": "Script API", - "notePosition": 20, - "prefix": null, - "isExpanded": false, - "type": "text", - "mime": "text/markdown", - "attributes": [ - { - "type": "label", - "name": "shareAlias", - "value": "script-api", - "isInheritable": false, - "position": 10 - } - ], - "format": "markdown", - "dataFileName": "Script API.md", - "attachments": [] - }, - { - "isClone": false, - "noteId": "GPERMystNGTB", - "notePath": [ - "pOsGYCXsbNQG", - "tC7s2alapj8V", - "6f9hih2hXXZk", - "GPERMystNGTB" - ], - "title": "Events", - "notePosition": 40, - "prefix": null, - "isExpanded": false, - "type": "text", - "mime": "text/markdown", - "attributes": [ - { - "type": "relation", - "name": "internalLink", - "value": "zEY4DaJG4YT5", - "isInheritable": false, - "position": 10 - }, - { - "type": "relation", - "name": "internalLink", - "value": "CdNpE2pqjmI6", - "isInheritable": false, - "position": 20 - }, - { - "type": "label", - "name": "shareAlias", - "value": "events", - "isInheritable": false, - "position": 30 - } - ], - "format": "markdown", - "dataFileName": "Events.md", - "attachments": [] - }, - { - "isClone": false, - "noteId": "MgibgPcfeuGz", - "notePath": [ - "pOsGYCXsbNQG", - "tC7s2alapj8V", - "6f9hih2hXXZk", - "MgibgPcfeuGz" - ], - "title": "Custom Widgets", - "notePosition": 50, - "prefix": null, - "isExpanded": false, - "type": "text", - "mime": "text/markdown", - "attributes": [ - { - "type": "relation", - "name": "imageLink", - "value": "3sCPPL0LEC1S", - "isInheritable": false, - "position": 10 - }, - { - "type": "label", - "name": "shareAlias", - "value": "custom-widget", - "isInheritable": false, - "position": 20 - } - ], - "format": "markdown", - "dataFileName": "Custom Widgets.md", - "attachments": [] - } - ] - }, { "isClone": false, "noteId": "5668rwcirq1t", @@ -1944,6 +1701,71 @@ "dataFileName": "1_Global menu_image.png" } ] + }, + { + "isClone": false, + "noteId": "BlN9DFI679QC", + "notePath": [ + "pOsGYCXsbNQG", + "gh7bpGYxajRS", + "Vc8PjrjAGuOp", + "BlN9DFI679QC" + ], + "title": "Ribbon", + "notePosition": 20, + "prefix": null, + "isExpanded": false, + "type": "text", + "mime": "text/html", + "attributes": [ + { + "type": "relation", + "name": "internalLink", + "value": "4TIF1oA4VQRO", + "isInheritable": false, + "position": 10 + } + ], + "format": "markdown", + "dataFileName": "Ribbon.md", + "attachments": [ + { + "attachmentId": "JCiJ3vRhgXY9", + "title": "image.png", + "role": "image", + "mime": "image/jpg", + "position": 10, + "dataFileName": "Ribbon_image.png" + } + ] + }, + { + "isClone": false, + "noteId": "4TIF1oA4VQRO", + "notePath": [ + "pOsGYCXsbNQG", + "gh7bpGYxajRS", + "Vc8PjrjAGuOp", + "4TIF1oA4VQRO" + ], + "title": "Options", + "notePosition": 30, + "prefix": null, + "isExpanded": false, + "type": "text", + "mime": "text/html", + "attributes": [ + { + "type": "label", + "name": "iconClass", + "value": "bx bx-cog", + "isInheritable": false, + "position": 10 + } + ], + "format": "markdown", + "dataFileName": "Options.md", + "attachments": [] } ] }, @@ -3498,6 +3320,13 @@ "name": "shareAlias", "value": "text-notes", "isInheritable": false, + "position": 10 + }, + { + "type": "label", + "name": "sorted", + "value": "", + "isInheritable": false, "position": 20 } ], @@ -3523,6 +3352,87 @@ ], "dirFileName": "Text", "children": [ + { + "isClone": false, + "noteId": "QxEyIjRBizuC", + "notePath": [ + "pOsGYCXsbNQG", + "KSZ04uQ2D1St", + "iPIMuisry3hd", + "QxEyIjRBizuC" + ], + "title": "Code blocks", + "notePosition": 10, + "prefix": null, + "isExpanded": false, + "type": "text", + "mime": "text/html", + "attributes": [ + { + "type": "relation", + "name": "internalLink", + "value": "nRhnJkTT8cPs", + "isInheritable": false, + "position": 20 + }, + { + "type": "relation", + "name": "internalLink", + "value": "4TIF1oA4VQRO", + "isInheritable": false, + "position": 30 + }, + { + "type": "relation", + "name": "internalLink", + "value": "s8alTXmpFR61", + "isInheritable": false, + "position": 40 + }, + { + "type": "label", + "name": "iconClass", + "value": "bx bx-code", + "isInheritable": false, + "position": 50 + }, + { + "type": "relation", + "name": "internalLink", + "value": "6f9hih2hXXZk", + "isInheritable": false, + "position": 60 + } + ], + "format": "markdown", + "dataFileName": "Code blocks.md", + "attachments": [ + { + "attachmentId": "7HhhhyZ4AS0A", + "title": "image.png", + "role": "image", + "mime": "image/png", + "position": 10, + "dataFileName": "Code blocks_image.png" + }, + { + "attachmentId": "DyHSLO958cdd", + "title": "image.png", + "role": "image", + "mime": "image/jpg", + "position": 10, + "dataFileName": "1_Code blocks_image.png" + }, + { + "attachmentId": "kE8PPw7iyuu9", + "title": "image.png", + "role": "image", + "mime": "image/png", + "position": 10, + "dataFileName": "2_Code blocks_image.png" + } + ] + }, { "isClone": false, "noteId": "veGu4faJErEM", @@ -3533,7 +3443,7 @@ "veGu4faJErEM" ], "title": "Content language", - "notePosition": 10, + "notePosition": 20, "prefix": null, "isExpanded": false, "type": "text", @@ -3545,6 +3455,13 @@ "value": "BMf2nEbYlcUt", "isInheritable": false, "position": 10 + }, + { + "type": "label", + "name": "iconClass", + "value": "bx bx-align-right", + "isInheritable": false, + "position": 20 } ], "format": "markdown", @@ -3560,6 +3477,81 @@ } ] }, + { + "isClone": false, + "noteId": "nRhnJkTT8cPs", + "notePath": [ + "pOsGYCXsbNQG", + "KSZ04uQ2D1St", + "iPIMuisry3hd", + "nRhnJkTT8cPs" + ], + "title": "Formatting toolbar", + "notePosition": 30, + "prefix": null, + "isExpanded": false, + "type": "text", + "mime": "text/html", + "attributes": [ + { + "type": "relation", + "name": "internalLink", + "value": "BlN9DFI679QC", + "isInheritable": false, + "position": 10 + }, + { + "type": "label", + "name": "iconClass", + "value": "bx bx-text", + "isInheritable": false, + "position": 20 + }, + { + "type": "relation", + "name": "internalLink", + "value": "4TIF1oA4VQRO", + "isInheritable": false, + "position": 30 + } + ], + "format": "markdown", + "dataFileName": "Formatting toolbar.md", + "attachments": [ + { + "attachmentId": "CZ8ENj2LsBsA", + "title": "image.png", + "role": "image", + "mime": "image/jpg", + "position": 10, + "dataFileName": "Formatting toolbar_image.png" + }, + { + "attachmentId": "iu9xb3VivIIl", + "title": "image.png", + "role": "image", + "mime": "image/jpg", + "position": 10, + "dataFileName": "1_Formatting toolbar_image.png" + }, + { + "attachmentId": "MMeih4nJVgNk", + "title": "image.png", + "role": "image", + "mime": "image/jpg", + "position": 10, + "dataFileName": "2_Formatting toolbar_image.png" + }, + { + "attachmentId": "SGaPJHzNyLLV", + "title": "image.png", + "role": "image", + "mime": "image/jpg", + "position": 10, + "dataFileName": "3_Formatting toolbar_image.png" + } + ] + }, { "isClone": false, "noteId": "S6Xx8QIWTV66", @@ -3570,7 +3562,7 @@ "S6Xx8QIWTV66" ], "title": "Lists", - "notePosition": 20, + "notePosition": 40, "prefix": null, "isExpanded": false, "type": "text", @@ -3641,30 +3633,296 @@ }, { "isClone": false, - "noteId": "FVuX89AJuFSw", + "noteId": "6f9hih2hXXZk", "notePath": [ "pOsGYCXsbNQG", "KSZ04uQ2D1St", - "FVuX89AJuFSw" + "6f9hih2hXXZk" ], "title": "Code", - "notePosition": 30, + "notePosition": 40, "prefix": null, "isExpanded": false, "type": "text", - "mime": "text/html", + "mime": "text/markdown", "attributes": [ + { + "type": "label", + "name": "shareAlias", + "value": "code-notes", + "isInheritable": false, + "position": 20 + }, + { + "type": "relation", + "name": "internalLink", + "value": "CdNpE2pqjmI6", + "isInheritable": false, + "position": 30 + }, + { + "type": "relation", + "name": "internalLink", + "value": "iPIMuisry3hd", + "isInheritable": false, + "position": 40 + }, + { + "type": "relation", + "name": "internalLink", + "value": "QxEyIjRBizuC", + "isInheritable": false, + "position": 50 + }, + { + "type": "relation", + "name": "internalLink", + "value": "BlN9DFI679QC", + "isInheritable": false, + "position": 60 + }, + { + "type": "relation", + "name": "internalLink", + "value": "4TIF1oA4VQRO", + "isInheritable": false, + "position": 70 + }, + { + "type": "relation", + "name": "internalLink", + "value": "s8alTXmpFR61", + "isInheritable": false, + "position": 80 + }, { "type": "label", "name": "iconClass", "value": "bx bx-code", "isInheritable": false, - "position": 10 + "position": 90 } ], "format": "markdown", "dataFileName": "Code.md", - "attachments": [] + "attachments": [ + { + "attachmentId": "hajUVeLs3EOM", + "title": "image.png", + "role": "image", + "mime": "image/jpg", + "position": 10, + "dataFileName": "Code_image.png" + }, + { + "attachmentId": "iKJbcEUkME1a", + "title": "image.png", + "role": "image", + "mime": "image/jpg", + "position": 10, + "dataFileName": "1_Code_image.png" + }, + { + "attachmentId": "OTcapNOcNaBL", + "title": "image.png", + "role": "image", + "mime": "image/jpg", + "position": 10, + "dataFileName": "2_Code_image.png" + } + ], + "dirFileName": "Code", + "children": [ + { + "isClone": false, + "noteId": "CdNpE2pqjmI6", + "notePath": [ + "pOsGYCXsbNQG", + "KSZ04uQ2D1St", + "6f9hih2hXXZk", + "CdNpE2pqjmI6" + ], + "title": "Scripts", + "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", + "value": "GLks18SNjxmC", + "isInheritable": false, + "position": 20 + }, + { + "type": "relation", + "name": "internalLink", + "value": "zEY4DaJG4YT5", + "isInheritable": false, + "position": 30 + }, + { + "type": "relation", + "name": "internalLink", + "value": "5668rwcirq1t", + "isInheritable": false, + "position": 40 + }, + { + "type": "relation", + "name": "internalLink", + "value": "GPERMystNGTB", + "isInheritable": false, + "position": 50 + }, + { + "type": "relation", + "name": "imageLink", + "value": "DVJl4l3T8EG2", + "isInheritable": false, + "position": 60 + }, + { + "type": "relation", + "name": "internalLink", + "value": "wX4HbRucYSDD", + "isInheritable": false, + "position": 70 + }, + { + "type": "relation", + "name": "internalLink", + "value": "RDslemsQ6gCp", + "isInheritable": false, + "position": 80 + }, + { + "type": "label", + "name": "shareAlias", + "value": "scripts", + "isInheritable": false, + "position": 20 + } + ], + "format": "markdown", + "dataFileName": "Scripts.md", + "attachments": [] + }, + { + "isClone": false, + "noteId": "GLks18SNjxmC", + "notePath": [ + "pOsGYCXsbNQG", + "KSZ04uQ2D1St", + "6f9hih2hXXZk", + "GLks18SNjxmC" + ], + "title": "Script API", + "notePosition": 20, + "prefix": null, + "isExpanded": false, + "type": "text", + "mime": "text/markdown", + "attributes": [ + { + "type": "label", + "name": "shareAlias", + "value": "script-api", + "isInheritable": false, + "position": 10 + } + ], + "format": "markdown", + "dataFileName": "Script API.md", + "attachments": [] + }, + { + "isClone": false, + "noteId": "GPERMystNGTB", + "notePath": [ + "pOsGYCXsbNQG", + "KSZ04uQ2D1St", + "6f9hih2hXXZk", + "GPERMystNGTB" + ], + "title": "Events", + "notePosition": 40, + "prefix": null, + "isExpanded": false, + "type": "text", + "mime": "text/markdown", + "attributes": [ + { + "type": "relation", + "name": "internalLink", + "value": "zEY4DaJG4YT5", + "isInheritable": false, + "position": 10 + }, + { + "type": "relation", + "name": "internalLink", + "value": "CdNpE2pqjmI6", + "isInheritable": false, + "position": 20 + }, + { + "type": "label", + "name": "shareAlias", + "value": "events", + "isInheritable": false, + "position": 30 + } + ], + "format": "markdown", + "dataFileName": "Events.md", + "attachments": [] + }, + { + "isClone": false, + "noteId": "MgibgPcfeuGz", + "notePath": [ + "pOsGYCXsbNQG", + "KSZ04uQ2D1St", + "6f9hih2hXXZk", + "MgibgPcfeuGz" + ], + "title": "Custom Widgets", + "notePosition": 50, + "prefix": null, + "isExpanded": false, + "type": "text", + "mime": "text/markdown", + "attributes": [ + { + "type": "relation", + "name": "imageLink", + "value": "3sCPPL0LEC1S", + "isInheritable": false, + "position": 10 + }, + { + "type": "label", + "name": "shareAlias", + "value": "custom-widget", + "isInheritable": false, + "position": 20 + } + ], + "format": "markdown", + "dataFileName": "Custom Widgets.md", + "attachments": [] + } + ] }, { "isClone": false, @@ -3675,7 +3933,7 @@ "m523cpzocqaD" ], "title": "Saved Search", - "notePosition": 50, + "notePosition": 60, "prefix": null, "isExpanded": false, "type": "text", @@ -3723,7 +3981,7 @@ "joqzSrDccPKf" ], "title": "Relation Map", - "notePosition": 60, + "notePosition": 70, "prefix": null, "isExpanded": false, "type": "text", @@ -3750,7 +4008,7 @@ "bdUJEHsAPYQR" ], "title": "Note Map", - "notePosition": 70, + "notePosition": 80, "prefix": null, "isExpanded": false, "type": "text", @@ -3777,7 +4035,7 @@ "HcABDtFCkbFN" ], "title": "Render Note", - "notePosition": 90, + "notePosition": 100, "prefix": null, "isExpanded": false, "type": "text", @@ -3804,7 +4062,7 @@ "GTwFsgaA0lCt" ], "title": "Book", - "notePosition": 110, + "notePosition": 120, "prefix": null, "isExpanded": false, "type": "text", @@ -4054,7 +4312,7 @@ "s1aBHPd79XYj" ], "title": "Mermaid Diagrams", - "notePosition": 120, + "notePosition": 130, "prefix": null, "isExpanded": false, "type": "text", @@ -4161,7 +4419,7 @@ "grjYqerjn243" ], "title": "Canvas", - "notePosition": 140, + "notePosition": 150, "prefix": null, "isExpanded": false, "type": "text", @@ -4197,7 +4455,7 @@ "1vHRoWCEjj0L" ], "title": "Web View", - "notePosition": 150, + "notePosition": 160, "prefix": null, "isExpanded": false, "type": "text", @@ -4224,7 +4482,7 @@ "gBbsAeiuUxI5" ], "title": "Mind Map", - "notePosition": 160, + "notePosition": 170, "prefix": null, "isExpanded": false, "type": "text", @@ -4251,7 +4509,7 @@ "81SGnPGMk7Xc" ], "title": "Geo map", - "notePosition": 170, + "notePosition": 180, "prefix": null, "isExpanded": false, "type": "text", @@ -6192,6 +6450,25 @@ "format": "markdown", "dataFileName": "Synchronization fails with 504.md", "attachments": [] + }, + { + "isClone": false, + "noteId": "s8alTXmpFR61", + "notePath": [ + "pOsGYCXsbNQG", + "BgmBlOIl72jZ", + "s8alTXmpFR61" + ], + "title": "Refreshing the application", + "notePosition": 60, + "prefix": null, + "isExpanded": false, + "type": "text", + "mime": "text/html", + "attributes": [], + "format": "markdown", + "dataFileName": "Refreshing the application.md", + "attachments": [] } ] }, diff --git a/docs/User Guide/User Guide/Advanced Usage/Advanced Showcases.md b/docs/User Guide/User Guide/Advanced Usage/Advanced Showcases.md index 29b50da68..b11d347af 100644 --- a/docs/User Guide/User Guide/Advanced Usage/Advanced Showcases.md +++ b/docs/User Guide/User Guide/Advanced Usage/Advanced Showcases.md @@ -1,5 +1,5 @@ # Advanced Showcases -Trilium offers advanced functionality through [Scripts](Code%20Notes/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/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): * [Relation Map](Relation%20Map.md) * [Day Notes](Advanced%20Showcases/Day%20Notes.md) diff --git a/docs/User Guide/User Guide/Advanced Usage/Advanced Showcases/Task Manager.md b/docs/User Guide/User Guide/Advanced Usage/Advanced Showcases/Task Manager.md index 0611fdcd6..86fb3e054 100644 --- a/docs/User Guide/User Guide/Advanced Usage/Advanced Showcases/Task Manager.md +++ b/docs/User Guide/User Guide/Advanced Usage/Advanced Showcases/Task Manager.md @@ -1,5 +1,5 @@ # Task Manager -Task Manager is a [promoted attributes](../Attributes/Promoted%20Attributes.md) and [scripts](../Code%20Notes/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/Scripts.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](../Code%20Notes/Events.md) handler which is run on attribute change. This [script](../Code%20Notes/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/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. ### New task button @@ -46,7 +46,7 @@ api.addButtonToToolbar({ In the demo screenshot above you may notice that TODO tasks are in red color and DONE tasks are green. -This is done by having this CSS [code note](../Code%20Notes.md) which defines extra CSS classes: +This is done by having this CSS [code note](../../Note%20Types/Code.md) which defines extra CSS classes: ``` span.fancytree-node.todo .fancytree-title { @@ -58,6 +58,6 @@ span.fancytree-node.done .fancytree-title { } ``` -This [code note](../Code%20Notes.md) has `#appCss` [label](../Attributes.md)which is recognized by Trilium on startup and loaded as CSS into the application. +This [code note](../../Note%20Types/Code.md) has `#appCss` [label](../Attributes.md)which is recognized by Trilium on startup and loaded as CSS into the application. Second part of this functionality is based in event handler described above which assigns `#cssClass` label to the task to either "done" or "todo" based on the task status. \ No newline at end of file diff --git a/docs/User Guide/User Guide/Advanced Usage/Advanced Showcases/Weight Tracker.md b/docs/User Guide/User Guide/Advanced Usage/Advanced Showcases/Weight Tracker.md index 3f93f7a7e..b760a050d 100644 --- a/docs/User Guide/User Guide/Advanced Usage/Advanced Showcases/Weight Tracker.md +++ b/docs/User Guide/User Guide/Advanced Usage/Advanced Showcases/Weight Tracker.md @@ -1,21 +1,21 @@ # Weight Tracker ![](Weight%20Tracker_image.png) -The `Weight Tracker` is a [Script API](../Code%20Notes/Script%20API.md) showcase present in the [demo notes](../Database.md). +The `Weight Tracker` is a [Script API](../../Note%20Types/Code/Script%20API.md) showcase present in the [demo notes](../Database.md). By adding `weight` as a [promoted attribute](../Attributes/Promoted%20Attributes.md) in the [template](../Attributes/Template.md) from which [day notes](Day%20Notes.md) are created, you can aggregate the data and plot weight change over time. ## 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](../Code%20Notes/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/Scripts.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](../Code%20Notes.md) that contain some HTML and JavaScript respectively, which load all the notes with a `weight` attribute and display their values in a chart. +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. To actually render the chart, we're using a third party library called [chart.js](https://www.chartjs.org/)which is imported as an attachment, since it's not built into Trilium. ### Code -Here's the content of the script which is placed in a [code note](../Code%20Notes.md) of type `JS Frontend`: +Here's the content of the script which is placed in a [code note](../../Note%20Types/Code.md) of type `JS Frontend`: ``` async function getChartData() { diff --git a/docs/User Guide/User Guide/Advanced Usage/Code Notes.md b/docs/User Guide/User Guide/Advanced Usage/Code Notes.md deleted file mode 100644 index e989655fd..000000000 --- a/docs/User Guide/User Guide/Advanced Usage/Code Notes.md +++ /dev/null @@ -1,21 +0,0 @@ -# Code Notes -Trilium supports creating "code" notes, i.e. notes which contain some sort of formal code - be it programming language (C++, JavaScript), structured data (JSON, XML) or other types of codes (CSS etc.). - -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%20Notes/Scripts.md) -* JSON, XML etc. can be used as storage for structured data (typically used in conjunction with scripting) - -![](Code%20Notes_image.png) - -## Extra languages - -Trilium supports syntax highlighting for many languages, but by default displays only some of them (to reduce the number of items). You can add extra languages in Options -> Code notes. - -## Code blocks - -An alternative to the code note is a "code block" - feature of a text note which can add short snippets of code to the text editor. Starting with TriliumNext v0.90.12, the code blocks also support syntax highlighting. - -![](1_Code%20Notes_image.png) \ No newline at end of file diff --git a/docs/User Guide/User Guide/Advanced Usage/Custom Request Handler.md b/docs/User Guide/User Guide/Advanced Usage/Custom Request Handler.md index 00963321d..3b1e52cf1 100644 --- a/docs/User Guide/User Guide/Advanced Usage/Custom Request Handler.md +++ b/docs/User Guide/User Guide/Advanced Usage/Custom Request Handler.md @@ -1,11 +1,11 @@ # Custom Request Handler -Trilium provides a mechanism for [scripts](Code%20Notes/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/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`). ## Create note from outside Trilium Let's take a look at an example. The goal is to provide a REST endpoint to which we can send title and content and Trilium will create a note. -We'll start with creating a JavaScript backend [code note](Code%20Notes.md) containing: +We'll start with creating a JavaScript backend [code note](../Note%20Types/Code.md) containing: ``` const {req, res} = api; @@ -53,7 +53,7 @@ Trilium will then find our code note created above and execute it. `api.req`, `a In the code note we check the request method and then use trivial authentication - keep in mind that these endpoints are by default totally unauthenticated, and you need to take care of this yourself. -Once we pass these checks we will just create the desired note using [Script API](Code%20Notes/Script%20API.md). +Once we pass these checks we will just create the desired note using [Script API](../Note%20Types/Code/Script%20API.md). ## Custom resource provider diff --git a/docs/User Guide/User Guide/Advanced Usage/Sharing.md b/docs/User Guide/User Guide/Advanced Usage/Sharing.md index e0666e301..2daa5fadc 100644 --- a/docs/User Guide/User Guide/Advanced Usage/Sharing.md +++ b/docs/User Guide/User Guide/Advanced Usage/Sharing.md @@ -40,7 +40,7 @@ To protect shared notes with a username and password, you can use the `#shareCre The default shared page is basic in design, but you can customize it using your own CSS: -* **Custom CSS**: Link a CSS [code note](Code%20Notes.md) to the shared page by adding a `~shareCss` relation to the note. If you want this style to apply to the entire subtree, make the label inheritable. You can hide the CSS code note from the tree navigation by adding the `#shareHiddenFromTree` label. +* **Custom CSS**: Link a CSS [code note](../Note%20Types/Code.md) to the shared page by adding a `~shareCss` relation to the note. If you want this style to apply to the entire subtree, make the label inheritable. You can hide the CSS code note from the tree navigation by adding the `#shareHiddenFromTree` label. * **Omitting Default CSS**: For extensive styling changes, use the `#shareOmitDefaultCss` label to avoid conflicts with Trilium's [default stylesheet](../Basic%20Concepts/Themes.md). ### Adding JavaScript diff --git a/docs/User Guide/User Guide/Basic Concepts/Keyboard Shortcuts.md b/docs/User Guide/User Guide/Basic Concepts/Keyboard Shortcuts.md index 26eb4e782..254745853 100644 --- a/docs/User Guide/User Guide/Basic Concepts/Keyboard Shortcuts.md +++ b/docs/User Guide/User Guide/Basic Concepts/Keyboard Shortcuts.md @@ -49,7 +49,7 @@ Only in desktop (electron build): ## Editing notes -Trilium uses CKEditor 5 for the [text notes](../Note%20Types/Text.md) and CodeMirror 5 for [code notes](../Advanced%20Usage/Code%20Notes.md). Check the documentation of these projects to see all their built-in keyboard shortcuts. +Trilium uses CKEditor 5 for the [text notes](../Note%20Types/Text.md) and CodeMirror 5 for [code notes](../Note%20Types/Code.md). Check the documentation of these projects to see all their built-in keyboard shortcuts. * `ALT-F10` - bring up inline formatting toolbar (arrow keys `<-`,`->` to navigate, `ENTER` to apply) * `ALT-F10` - again to bring up block formatting toolbar diff --git a/docs/User Guide/User Guide/Basic Concepts/Note.md b/docs/User Guide/User Guide/Basic Concepts/Note.md index 463614fb3..9e8dad5e5 100644 --- a/docs/User Guide/User Guide/Basic Concepts/Note.md +++ b/docs/User Guide/User Guide/Basic Concepts/Note.md @@ -4,10 +4,10 @@ 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](../Advanced%20Usage/Code%20Notes.md) - some kind of formal code, typically programming language (e.g. JavaScript) or data structure (e.g. JSON) +* [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](../Advanced%20Usage/Code%20Notes/Scripts.md) +* 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](../Advanced%20Usage/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 diff --git a/docs/User Guide/User Guide/Basic Concepts/Note/Attachments.md b/docs/User Guide/User Guide/Basic Concepts/Note/Attachments.md index 20e75b8ed..8e5fe9a68 100644 --- a/docs/User Guide/User Guide/Basic Concepts/Note/Attachments.md +++ b/docs/User Guide/User Guide/Basic Concepts/Note/Attachments.md @@ -1,7 +1,7 @@ # Attachments A [note](../Note.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](../../Advanced%20Usage/Code%20Notes/Scripts.md). The [Weight Tracker](../../Advanced%20Usage/Advanced%20Showcases/Weight%20Tracker.md) 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/Scripts.md). The [Weight Tracker](../../Advanced%20Usage/Advanced%20Showcases/Weight%20Tracker.md) shows how to use [chartjs](https://chartjs.org/) which is attached to the [script note](#root/HcUYTojFohtb). 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. diff --git a/docs/User Guide/User Guide/Basic Concepts/Note/Read-Only Notes.md b/docs/User Guide/User Guide/Basic Concepts/Note/Read-Only Notes.md index 5feaa3387..60491d724 100644 --- a/docs/User Guide/User Guide/Basic Concepts/Note/Read-Only Notes.md +++ b/docs/User Guide/User Guide/Basic Concepts/Note/Read-Only Notes.md @@ -1,5 +1,5 @@ # Read-Only Notes -Both [text](../../Note%20Types/Text.md) and [code](../../Advanced%20Usage/Code%20Notes.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. +Both [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. ## Setting Read-Only Mode with a Label diff --git a/docs/User Guide/User Guide/Basic Concepts/Themes.md b/docs/User Guide/User Guide/Basic Concepts/Themes.md index 84919433e..f0932453f 100644 --- a/docs/User Guide/User Guide/Basic Concepts/Themes.md +++ b/docs/User Guide/User Guide/Basic Concepts/Themes.md @@ -9,7 +9,7 @@ Trilium comes with a couple pre-installed color themes, with the default being a Trilium supports custom user themes, allowing you to personalize the application's appearance. To create a custom theme, follow these steps: -1. **Create a CSS Code Note**: Start by creating a new [code note](../Advanced%20Usage/Code%20Notes.md) with the `CSS` type. +1. **Create a CSS Code Note**: Start by creating a new [code note](../Note%20Types/Code.md) with the `CSS` type. 2. **Annotate with** `**#appTheme**`: Add the [attribute](../Advanced%20Usage/Attributes.md) `#appTheme=my-theme-name` to your note, where `my-theme-name` is the name of your custom theme. 3. **Define Your Styles**: Write your custom CSS within the note. Below is an example of a custom theme: @@ -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](../Advanced%20Usage/Code%20Notes.md) with the `CSS` type. +1. **Create a CSS Code Note**: Create a new [code note](../Note%20Types/Code.md) 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. diff --git a/docs/User Guide/User Guide/Basic Concepts/UI Elements/Options.md b/docs/User Guide/User Guide/Basic Concepts/UI Elements/Options.md new file mode 100644 index 000000000..e69de29bb diff --git a/docs/User Guide/User Guide/Basic Concepts/UI Elements/Ribbon.md b/docs/User Guide/User Guide/Basic Concepts/UI Elements/Ribbon.md new file mode 100644 index 000000000..e99138df6 --- /dev/null +++ b/docs/User Guide/User Guide/Basic Concepts/UI Elements/Ribbon.md @@ -0,0 +1,8 @@ +# Ribbon +![](Ribbon_image.png) + +The ribbon allows changing options, attributes and viewing information about the current note. + +## Settings + +It is possible to change whether some ribbon items will be automatically open when navigating to a new note. To do so, in [Settings](Options.md), go to _Appearance_ and look for the _Ribbon widgets_ section. \ No newline at end of file diff --git a/docs/User Guide/User Guide/Basic Concepts/UI Elements/Ribbon_image.png b/docs/User Guide/User Guide/Basic Concepts/UI Elements/Ribbon_image.png new file mode 100644 index 000000000..95fc8e664 Binary files /dev/null and b/docs/User Guide/User Guide/Basic Concepts/UI Elements/Ribbon_image.png differ diff --git a/docs/User Guide/User Guide/Developer Guides/Frontend Basics.md b/docs/User Guide/User Guide/Developer Guides/Frontend Basics.md index fdd9af407..fe5435548 100644 --- a/docs/User Guide/User Guide/Developer Guides/Frontend Basics.md +++ b/docs/User Guide/User Guide/Developer Guides/Frontend Basics.md @@ -1,7 +1,7 @@ # Frontend Basics ## Frontend API -The frontend api supports two styles, regular scripts that are run with the current app and note context, and widgets that export an object to Trilium to be used in the UI. In both cases, the frontend api of Trilium is available to scripts running in the frontend context as global variable `api`. The members and methods of the api can be seen on the [Script API](../Advanced%20Usage/Code%20Notes/Script%20API.md) page. +The frontend api supports two styles, regular scripts that are run with the current app and note context, and widgets that export an object to Trilium to be used in the UI. In both cases, the frontend api of Trilium is available to scripts running in the frontend context as global variable `api`. The members and methods of the api can be seen on the [Script API](../Note%20Types/Code/Script%20API.md) page. ## Scripts diff --git a/docs/User Guide/User Guide/Developer Guides/Widget Basics.md b/docs/User Guide/User Guide/Developer Guides/Widget Basics.md index 2eed9a097..8aa554a95 100644 --- a/docs/User Guide/User Guide/Developer Guides/Widget Basics.md +++ b/docs/User Guide/User Guide/Developer Guides/Widget Basics.md @@ -85,7 +85,7 @@ After reloading Trilium, the button should now appear at the bottom left of the ### Step 4: Adding User Interaction -Let’s make the button interactive by showing a message when it’s clicked. We'll use the `api.showMessage` method from the [Script API](../Advanced%20Usage/Code%20Notes/Script%20API.md). +Let’s make the button interactive by showing a message when it’s clicked. We'll use the `api.showMessage` method from the [Script API](../Note%20Types/Code/Script%20API.md). ``` class MyWidget extends api.BasicWidget { diff --git a/docs/User Guide/User Guide/FAQ.md b/docs/User Guide/User Guide/FAQ.md index 8090f22d8..b9ce905dd 100644 --- a/docs/User Guide/User Guide/FAQ.md +++ b/docs/User Guide/User Guide/FAQ.md @@ -23,7 +23,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](Advanced%20Usage/Code%20Notes/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/Scripts.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 diff --git a/docs/User Guide/User Guide/Installation & Setup/Mobile Frontend.md b/docs/User Guide/User Guide/Installation & Setup/Mobile Frontend.md index f64b214e8..fab7cf292 100644 --- a/docs/User Guide/User Guide/Installation & Setup/Mobile Frontend.md +++ b/docs/User Guide/User Guide/Installation & Setup/Mobile Frontend.md @@ -31,4 +31,4 @@ Trilium decides automatically whether to use mobile or desktop frontend. If this ## Scripting -You can alter the behavior with [scripts](../Advanced%20Usage/Code%20Notes/Scripts.md) just like for normal frontend. For script notes to be executed, they need to have labeled `#run=mobileStartup`. \ No newline at end of file +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`. \ No newline at end of file diff --git a/docs/User Guide/User Guide/Note Types/1_Code_image.png b/docs/User Guide/User Guide/Note Types/1_Code_image.png new file mode 100644 index 000000000..7520e45c1 Binary files /dev/null and b/docs/User Guide/User Guide/Note Types/1_Code_image.png differ diff --git a/docs/User Guide/User Guide/Advanced Usage/1_Code Notes_image.png b/docs/User Guide/User Guide/Note Types/2_Code_image.png similarity index 100% rename from docs/User Guide/User Guide/Advanced Usage/1_Code Notes_image.png rename to docs/User Guide/User Guide/Note Types/2_Code_image.png diff --git a/docs/User Guide/User Guide/Note Types/Code.md b/docs/User Guide/User Guide/Note Types/Code.md index e69de29bb..e1725bdae 100644 --- a/docs/User Guide/User Guide/Note Types/Code.md +++ b/docs/User Guide/User Guide/Note Types/Code.md @@ -0,0 +1,27 @@ +# Code +Trilium supports creating "code" notes, i.e. notes which contain some sort of formal code - be it programming language (C++, JavaScript), structured data (JSON, XML) or other types of codes (CSS etc.). + +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) +* 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/Code%20blocks.md). + +![](Code_image.png) + +## Adjusting the language of a code note + +In the [Ribbon](../Basic%20Concepts/UI%20Elements/Ribbon.md), look for the _Note type_ selector and click it to reveal the possible note types. Inside of it there will be a section called _Code_, select any one of the languages. + +![](1_Code_image.png) + +## Adjusting the list of languages + +Trilium supports syntax highlighting for many languages, but by default displays only some of them. The supported languages can be adjusted by going to [Options](../Basic%20Concepts/UI%20Elements/Options.md), then _Code Notes_ and looking for the _Available MIME types in the dropdown_ section. Simply check any of the items to add them to the list, or un-check them to remove them from the list. + +Note that the list of languages is not immediately refreshed, you'd have to manually [refresh the application](../Troubleshooting/Refreshing%20the%20application.md). + +The list of languages is also shared with the [Code blocks](Text/Code%20blocks.md) feature of [Text](Text.md) notes. \ No newline at end of file diff --git a/docs/User Guide/User Guide/Advanced Usage/Code Notes/Custom Widgets.md b/docs/User Guide/User Guide/Note Types/Code/Custom Widgets.md similarity index 100% rename from docs/User Guide/User Guide/Advanced Usage/Code Notes/Custom Widgets.md rename to docs/User Guide/User Guide/Note Types/Code/Custom Widgets.md diff --git a/docs/User Guide/User Guide/Advanced Usage/Code Notes/Events.md b/docs/User Guide/User Guide/Note Types/Code/Events.md similarity index 91% rename from docs/User Guide/User Guide/Advanced Usage/Code Notes/Events.md rename to docs/User Guide/User Guide/Note Types/Code/Events.md index add2fa5a2..5c90db376 100644 --- a/docs/User Guide/User Guide/Advanced Usage/Code Notes/Events.md +++ b/docs/User Guide/User Guide/Note Types/Code/Events.md @@ -14,7 +14,7 @@ Global events are attached to the script note via label. Simply create e.g. "run ## Entity events -Other events are bound to some entity, these are defined as [relations](../Attributes.md) - meaning that script is triggered only if note has this script attached to it through relations (or it can inherit it). +Other events are bound to some entity, these are defined as [relations](../../Advanced%20Usage/Attributes.md) - meaning that script is triggered only if note has this script attached to it through relations (or it can inherit it). * `runOnNoteCreation` - executes when note is created on backend * `runOnNoteTitleChange` - executes when note title is changed (includes note creation as well) diff --git a/docs/User Guide/User Guide/Advanced Usage/Code Notes/Script API.md b/docs/User Guide/User Guide/Note Types/Code/Script API.md similarity index 100% rename from docs/User Guide/User Guide/Advanced Usage/Code Notes/Script API.md rename to docs/User Guide/User Guide/Note Types/Code/Script API.md diff --git a/docs/User Guide/User Guide/Advanced Usage/Code Notes/Scripts.md b/docs/User Guide/User Guide/Note Types/Code/Scripts.md similarity index 76% rename from docs/User Guide/User Guide/Advanced Usage/Code Notes/Scripts.md rename to docs/User Guide/User Guide/Note Types/Code/Scripts.md index 0be851d73..ecd15270c 100644 --- a/docs/User Guide/User Guide/Advanced Usage/Code Notes/Scripts.md +++ b/docs/User Guide/User Guide/Note Types/Code/Scripts.md @@ -1,5 +1,5 @@ # Scripts -Trilium supports creating [code notes](../Code%20Notes.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. +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 @@ -12,7 +12,7 @@ So we have frontend and backend, each with their own set of responsibilities, bu ## Button use case -Let's take a look at our demo script (shipped with default Trilium [database](../Database.md)) - Task manager. One of the things this script does is adding a button to the Trilium interface which will allow user to easily add new Task (TODO item). +Let's take a look at our demo script (shipped with default Trilium [database](../../Advanced%20Usage/Database.md)) - Task manager. One of the things this script does is adding a button to the Trilium interface which will allow user to easily add new Task (TODO item). ![](../../Attachments/button-script.png) @@ -37,13 +37,13 @@ So we have a script which will add the button to the toolbar. But how can we exe We need to execute it every time Trilium starts up, but we probably don't want to have to manually click on play button on every start up. -The solution is marked by red circle at the bottom - this note has [label](../Attributes.md) `#run=frontendStartup` - this is one of the "system" labels which Trilium understands. As you might guess, this will cause all such labeled script notes to be executed once Trilium frontend starts up. +The solution is marked by red circle at the bottom - this note has [label](../../Advanced%20Usage/Attributes.md) `#run=frontendStartup` - this is one of the "system" labels which Trilium understands. As you might guess, this will cause all such labeled script notes to be executed once Trilium frontend starts up. (`#run=frontendStartup` does not work for [Mobile frontend](../../Installation%20%26%20Setup/Mobile%20Frontend.md) - if you want to have scripts running there, give the script `#run=mobileStartup` label) ### More showcases -You can see more scripting with explanation in [Advanced showcases](../Advanced%20Showcases.md) +You can see more scripting with explanation in [Advanced showcases](../../Advanced%20Usage/Advanced%20Showcases.md) ## Events diff --git a/docs/User Guide/User Guide/Advanced Usage/Code Notes_image.png b/docs/User Guide/User Guide/Note Types/Code_image.png similarity index 100% rename from docs/User Guide/User Guide/Advanced Usage/Code Notes_image.png rename to docs/User Guide/User Guide/Note Types/Code_image.png diff --git a/docs/User Guide/User Guide/Note Types/Text/1_Code blocks_image.png b/docs/User Guide/User Guide/Note Types/Text/1_Code blocks_image.png new file mode 100644 index 000000000..ef28ed50d Binary files /dev/null and b/docs/User Guide/User Guide/Note Types/Text/1_Code blocks_image.png differ diff --git a/docs/User Guide/User Guide/Note Types/Text/1_Formatting toolbar_image.png b/docs/User Guide/User Guide/Note Types/Text/1_Formatting toolbar_image.png new file mode 100644 index 000000000..bc6bd96c4 Binary files /dev/null and b/docs/User Guide/User Guide/Note Types/Text/1_Formatting toolbar_image.png differ diff --git a/docs/User Guide/User Guide/Note Types/Text/2_Code blocks_image.png b/docs/User Guide/User Guide/Note Types/Text/2_Code blocks_image.png new file mode 100644 index 000000000..3d13d72b5 Binary files /dev/null and b/docs/User Guide/User Guide/Note Types/Text/2_Code blocks_image.png differ diff --git a/docs/User Guide/User Guide/Note Types/Text/2_Formatting toolbar_image.png b/docs/User Guide/User Guide/Note Types/Text/2_Formatting toolbar_image.png new file mode 100644 index 000000000..c7d879eba Binary files /dev/null and b/docs/User Guide/User Guide/Note Types/Text/2_Formatting toolbar_image.png differ diff --git a/docs/User Guide/User Guide/Note Types/Text/3_Formatting toolbar_image.png b/docs/User Guide/User Guide/Note Types/Text/3_Formatting toolbar_image.png new file mode 100644 index 000000000..3270223e2 Binary files /dev/null and b/docs/User Guide/User Guide/Note Types/Text/3_Formatting toolbar_image.png differ diff --git a/docs/User Guide/User Guide/Note Types/Text/Code blocks.md b/docs/User Guide/User Guide/Note Types/Text/Code blocks.md new file mode 100644 index 000000000..b969f532a --- /dev/null +++ b/docs/User Guide/User Guide/Note Types/Text/Code blocks.md @@ -0,0 +1,35 @@ +# Code blocks +![](1_Code%20blocks_image.png) + +The code blocks feature allows entering pieces of code in text notes. + +Note that this feature is meant for generally small snippets of code. For larger files such as an entire log, see the dedicated [\[missing note\]](#root/pOsGYCXsbNQG/KSZ04uQ2D1St/FVuX89AJuFSw) note type instead. + +## Inserting a code block + +* Via the [Formatting toolbar](Formatting%20toolbar.md), look for the ![](Code%20blocks_image.png) button. + * Pressing directly on the icon will insert a code block with the language that was selected most recently. If this is the first time a code block is inserted, the language will be “Auto-detected” by default. + * Pressing the arrow next to the icon, which will show a popup with the available languages. +* Type ` ``` ` (as in Markdown). + * Note that it's not possible to specify the language, as it will default to the last selected language. + +## Syntax highlighting + +Since TriliumNext v0.90.12, Trilium will try to offer syntax highlighting to the code block. Note that the syntax highlighting mechanism is slightly different than the one in [Code Notes](../Code.md) notes as different technologies are involved. + +When the language is set to _Auto-detected_, Trilium will try to identify the programming language (or similar) that corresponds to the given snippet of text and highlight it. If this is problematic, consider changing the language of the code block manually. + +When the language is set to _Plain text_, there will be no syntax highlighting. + +## Changing the language of a code block + +Simply click anywhere inside the code block and press again the code block button in the [Formatting toolbar](Formatting%20toolbar.md): +![](2_Code%20blocks_image.png) + +## Adjusting the list of languages + +The code blocks feature shares the list of languages with the [Code Notes](../Code.md) note type. + +The supported languages can be adjusted by going to [Options](../../Basic%20Concepts/UI%20Elements/Options.md), then _Code Notes_ and looking for the _Available MIME types in the dropdown_ section. Simply check any of the items to add them to the list, or uncheck them to remove them from the list. + +Note that the list of languages is not immediately refreshed, you'd have to manually [refresh the application](../../Troubleshooting/Refreshing%20the%20application.md). \ No newline at end of file diff --git a/docs/User Guide/User Guide/Note Types/Text/Code blocks_image.png b/docs/User Guide/User Guide/Note Types/Text/Code blocks_image.png new file mode 100644 index 000000000..0ba15d321 Binary files /dev/null and b/docs/User Guide/User Guide/Note Types/Text/Code blocks_image.png differ diff --git a/docs/User Guide/User Guide/Note Types/Text/Formatting toolbar.md b/docs/User Guide/User Guide/Note Types/Text/Formatting toolbar.md new file mode 100644 index 000000000..c9749ed06 --- /dev/null +++ b/docs/User Guide/User Guide/Note Types/Text/Formatting toolbar.md @@ -0,0 +1,35 @@ +# Formatting toolbar +Trilium allows two different editing experiences for text notes, based on your preference. + +To do so, go to [Options](../../Basic%20Concepts/UI%20Elements/Options.md) and look for the _Text Notes_ section. There is a corresponding section called _Formatting toolbar_. + +## Floating + +The floating bar is a more minimalist option, in which the formatting is hidden behind two different popups. + +### Block-level popup + +The first popup is the block-level popup. This will appear to the left of the current paragraph you are currently editing, as a sequence of dots: +![](1_Formatting%20toolbar_image.png) + +Clicking this popup will reveal the formatting options that are specific to the entire paragraph, such as setting a heading, lists, tables, etc. + +![](3_Formatting%20toolbar_image.png) + +### Inline popup + +The inline popup appears automatically when selecting a text: + +![](Formatting%20toolbar_image.png) + +All the options here apply only to the selected portion of text, such as changing the font size, or making the text bold. + +## Fixed + +The fixed formatting offers a more traditional editing paradigm, usually useful if a lot of formatting is needed. + +All the options are combined into a single toolbar that will appear as part of the [Ribbon](../../Basic%20Concepts/UI%20Elements/Ribbon.md). + +![](2_Formatting%20toolbar_image.png) + +By default, if the toolbar does not fit on the screen, the rest of the options will be grouped into a single option at the end. It is possible to display items on multiple lines by checking the corresponding option in the _Formatting toolbar_ section. \ No newline at end of file diff --git a/docs/User Guide/User Guide/Note Types/Text/Formatting toolbar_image.png b/docs/User Guide/User Guide/Note Types/Text/Formatting toolbar_image.png new file mode 100644 index 000000000..85578b78e Binary files /dev/null and b/docs/User Guide/User Guide/Note Types/Text/Formatting toolbar_image.png differ diff --git a/docs/User Guide/User Guide/Troubleshooting.md b/docs/User Guide/User Guide/Troubleshooting.md index f7d4210b1..69822cd8a 100644 --- a/docs/User Guide/User Guide/Troubleshooting.md +++ b/docs/User Guide/User Guide/Troubleshooting.md @@ -21,7 +21,7 @@ TRILIUM_START_NOTE_ID=root ./trilium ## Broken Script Prevents Application Startup -If a custom script causes Triliumto crash, and it is set as a startup script or in an active [custom widget](Advanced%20Usage/Code%20Notes/Custom%20Widgets.md), start Triliumin "safe mode" to prevent any custom scripts from executing: +If a custom script causes Triliumto crash, and it is set as a startup script or in an active [custom widget](Note%20Types/Code/Custom%20Widgets.md), start Triliumin "safe mode" to prevent any custom scripts from executing: ``` TRILIUM_SAFE_MODE=true ./trilium diff --git a/docs/User Guide/User Guide/Troubleshooting/Refreshing the application.md b/docs/User Guide/User Guide/Troubleshooting/Refreshing the application.md new file mode 100644 index 000000000..c7debdbcb --- /dev/null +++ b/docs/User Guide/User Guide/Troubleshooting/Refreshing the application.md @@ -0,0 +1,4 @@ +# Refreshing the application +Some changes to the application will not take effect immediately and as such it might require to manually reload or refresh the application. + +To do so, simply press Ctrl+Shift+R. \ No newline at end of file diff --git a/src/public/app/doc_notes/en/User Guide/!!!meta.json b/src/public/app/doc_notes/en/User Guide/!!!meta.json index 526ad8776..ecd6663d2 100644 --- a/src/public/app/doc_notes/en/User Guide/!!!meta.json +++ b/src/public/app/doc_notes/en/User Guide/!!!meta.json @@ -11,7 +11,7 @@ "title": "User Guide", "notePosition": 80, "prefix": null, - "isExpanded": false, + "isExpanded": true, "type": "text", "mime": "text/html", "attributes": [], @@ -30,7 +30,7 @@ "title": "Advanced Usage", "notePosition": 10, "prefix": null, - "isExpanded": false, + "isExpanded": true, "type": "text", "mime": "text/html", "attributes": [ @@ -634,249 +634,6 @@ } ] }, - { - "isClone": false, - "noteId": "6f9hih2hXXZk", - "notePath": [ - "pOsGYCXsbNQG", - "tC7s2alapj8V", - "6f9hih2hXXZk" - ], - "title": "Code Notes", - "notePosition": 60, - "prefix": null, - "isExpanded": false, - "type": "text", - "mime": "text/markdown", - "attributes": [ - { - "type": "relation", - "name": "internalLink", - "value": "CdNpE2pqjmI6", - "isInheritable": false, - "position": 10 - }, - { - "type": "label", - "name": "shareAlias", - "value": "code-notes", - "isInheritable": false, - "position": 20 - } - ], - "format": "html", - "dataFileName": "Code Notes.html", - "attachments": [ - { - "attachmentId": "hajUVeLs3EOM", - "title": "image.png", - "role": "image", - "mime": "image/jpg", - "position": 10, - "dataFileName": "Code Notes_image.png" - }, - { - "attachmentId": "OTcapNOcNaBL", - "title": "image.png", - "role": "image", - "mime": "image/jpg", - "position": 10, - "dataFileName": "1_Code Notes_image.png" - } - ], - "dirFileName": "Code Notes", - "children": [ - { - "isClone": false, - "noteId": "CdNpE2pqjmI6", - "notePath": [ - "pOsGYCXsbNQG", - "tC7s2alapj8V", - "6f9hih2hXXZk", - "CdNpE2pqjmI6" - ], - "title": "Scripts", - "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", - "value": "GLks18SNjxmC", - "isInheritable": false, - "position": 20 - }, - { - "type": "relation", - "name": "internalLink", - "value": "zEY4DaJG4YT5", - "isInheritable": false, - "position": 30 - }, - { - "type": "relation", - "name": "internalLink", - "value": "5668rwcirq1t", - "isInheritable": false, - "position": 40 - }, - { - "type": "relation", - "name": "internalLink", - "value": "GPERMystNGTB", - "isInheritable": false, - "position": 50 - }, - { - "type": "relation", - "name": "imageLink", - "value": "DVJl4l3T8EG2", - "isInheritable": false, - "position": 60 - }, - { - "type": "relation", - "name": "internalLink", - "value": "wX4HbRucYSDD", - "isInheritable": false, - "position": 70 - }, - { - "type": "relation", - "name": "internalLink", - "value": "RDslemsQ6gCp", - "isInheritable": false, - "position": 80 - }, - { - "type": "label", - "name": "shareAlias", - "value": "scripts", - "isInheritable": false, - "position": 20 - } - ], - "format": "html", - "dataFileName": "Scripts.html", - "attachments": [] - }, - { - "isClone": false, - "noteId": "GLks18SNjxmC", - "notePath": [ - "pOsGYCXsbNQG", - "tC7s2alapj8V", - "6f9hih2hXXZk", - "GLks18SNjxmC" - ], - "title": "Script API", - "notePosition": 20, - "prefix": null, - "isExpanded": false, - "type": "text", - "mime": "text/markdown", - "attributes": [ - { - "type": "label", - "name": "shareAlias", - "value": "script-api", - "isInheritable": false, - "position": 10 - } - ], - "format": "html", - "dataFileName": "Script API.html", - "attachments": [] - }, - { - "isClone": false, - "noteId": "GPERMystNGTB", - "notePath": [ - "pOsGYCXsbNQG", - "tC7s2alapj8V", - "6f9hih2hXXZk", - "GPERMystNGTB" - ], - "title": "Events", - "notePosition": 40, - "prefix": null, - "isExpanded": false, - "type": "text", - "mime": "text/markdown", - "attributes": [ - { - "type": "relation", - "name": "internalLink", - "value": "zEY4DaJG4YT5", - "isInheritable": false, - "position": 10 - }, - { - "type": "relation", - "name": "internalLink", - "value": "CdNpE2pqjmI6", - "isInheritable": false, - "position": 20 - }, - { - "type": "label", - "name": "shareAlias", - "value": "events", - "isInheritable": false, - "position": 30 - } - ], - "format": "html", - "dataFileName": "Events.html", - "attachments": [] - }, - { - "isClone": false, - "noteId": "MgibgPcfeuGz", - "notePath": [ - "pOsGYCXsbNQG", - "tC7s2alapj8V", - "6f9hih2hXXZk", - "MgibgPcfeuGz" - ], - "title": "Custom Widgets", - "notePosition": 50, - "prefix": null, - "isExpanded": false, - "type": "text", - "mime": "text/markdown", - "attributes": [ - { - "type": "relation", - "name": "imageLink", - "value": "3sCPPL0LEC1S", - "isInheritable": false, - "position": 10 - }, - { - "type": "label", - "name": "shareAlias", - "value": "custom-widget", - "isInheritable": false, - "position": 20 - } - ], - "format": "html", - "dataFileName": "Custom Widgets.html", - "attachments": [] - } - ] - }, { "isClone": false, "noteId": "5668rwcirq1t", @@ -1856,7 +1613,7 @@ "title": "Basic Concepts", "notePosition": 60, "prefix": null, - "isExpanded": false, + "isExpanded": true, "type": "text", "mime": "text/html", "attributes": [ @@ -1883,7 +1640,7 @@ "title": "UI Elements", "notePosition": 10, "prefix": null, - "isExpanded": false, + "isExpanded": true, "type": "text", "mime": "text/html", "attributes": [], @@ -1944,6 +1701,71 @@ "dataFileName": "1_Global menu_image.png" } ] + }, + { + "isClone": false, + "noteId": "BlN9DFI679QC", + "notePath": [ + "pOsGYCXsbNQG", + "gh7bpGYxajRS", + "Vc8PjrjAGuOp", + "BlN9DFI679QC" + ], + "title": "Ribbon", + "notePosition": 20, + "prefix": null, + "isExpanded": false, + "type": "text", + "mime": "text/html", + "attributes": [ + { + "type": "relation", + "name": "internalLink", + "value": "4TIF1oA4VQRO", + "isInheritable": false, + "position": 10 + } + ], + "format": "html", + "dataFileName": "Ribbon.html", + "attachments": [ + { + "attachmentId": "JCiJ3vRhgXY9", + "title": "image.png", + "role": "image", + "mime": "image/jpg", + "position": 10, + "dataFileName": "Ribbon_image.png" + } + ] + }, + { + "isClone": false, + "noteId": "4TIF1oA4VQRO", + "notePath": [ + "pOsGYCXsbNQG", + "gh7bpGYxajRS", + "Vc8PjrjAGuOp", + "4TIF1oA4VQRO" + ], + "title": "Options", + "notePosition": 30, + "prefix": null, + "isExpanded": false, + "type": "text", + "mime": "text/html", + "attributes": [ + { + "type": "label", + "name": "iconClass", + "value": "bx bx-cog", + "isInheritable": false, + "position": 10 + } + ], + "format": "html", + "dataFileName": "Options.html", + "attachments": [] } ] }, @@ -3427,7 +3249,7 @@ "title": "Note Types", "notePosition": 70, "prefix": null, - "isExpanded": false, + "isExpanded": true, "type": "text", "mime": "text/html", "attributes": [ @@ -3454,7 +3276,7 @@ "title": "Text", "notePosition": 10, "prefix": null, - "isExpanded": false, + "isExpanded": true, "type": "text", "mime": "text/markdown", "attributes": [ @@ -3498,6 +3320,13 @@ "name": "shareAlias", "value": "text-notes", "isInheritable": false, + "position": 10 + }, + { + "type": "label", + "name": "sorted", + "value": "", + "isInheritable": false, "position": 20 } ], @@ -3523,6 +3352,87 @@ ], "dirFileName": "Text", "children": [ + { + "isClone": false, + "noteId": "QxEyIjRBizuC", + "notePath": [ + "pOsGYCXsbNQG", + "KSZ04uQ2D1St", + "iPIMuisry3hd", + "QxEyIjRBizuC" + ], + "title": "Code blocks", + "notePosition": 10, + "prefix": null, + "isExpanded": false, + "type": "text", + "mime": "text/html", + "attributes": [ + { + "type": "relation", + "name": "internalLink", + "value": "nRhnJkTT8cPs", + "isInheritable": false, + "position": 20 + }, + { + "type": "relation", + "name": "internalLink", + "value": "4TIF1oA4VQRO", + "isInheritable": false, + "position": 30 + }, + { + "type": "relation", + "name": "internalLink", + "value": "s8alTXmpFR61", + "isInheritable": false, + "position": 40 + }, + { + "type": "label", + "name": "iconClass", + "value": "bx bx-code", + "isInheritable": false, + "position": 50 + }, + { + "type": "relation", + "name": "internalLink", + "value": "6f9hih2hXXZk", + "isInheritable": false, + "position": 60 + } + ], + "format": "html", + "dataFileName": "Code blocks.html", + "attachments": [ + { + "attachmentId": "7HhhhyZ4AS0A", + "title": "image.png", + "role": "image", + "mime": "image/png", + "position": 10, + "dataFileName": "Code blocks_image.png" + }, + { + "attachmentId": "DyHSLO958cdd", + "title": "image.png", + "role": "image", + "mime": "image/jpg", + "position": 10, + "dataFileName": "1_Code blocks_image.png" + }, + { + "attachmentId": "kE8PPw7iyuu9", + "title": "image.png", + "role": "image", + "mime": "image/png", + "position": 10, + "dataFileName": "2_Code blocks_image.png" + } + ] + }, { "isClone": false, "noteId": "veGu4faJErEM", @@ -3533,7 +3443,7 @@ "veGu4faJErEM" ], "title": "Content language", - "notePosition": 10, + "notePosition": 20, "prefix": null, "isExpanded": false, "type": "text", @@ -3545,6 +3455,13 @@ "value": "BMf2nEbYlcUt", "isInheritable": false, "position": 10 + }, + { + "type": "label", + "name": "iconClass", + "value": "bx bx-align-right", + "isInheritable": false, + "position": 20 } ], "format": "html", @@ -3560,6 +3477,81 @@ } ] }, + { + "isClone": false, + "noteId": "nRhnJkTT8cPs", + "notePath": [ + "pOsGYCXsbNQG", + "KSZ04uQ2D1St", + "iPIMuisry3hd", + "nRhnJkTT8cPs" + ], + "title": "Formatting toolbar", + "notePosition": 30, + "prefix": null, + "isExpanded": false, + "type": "text", + "mime": "text/html", + "attributes": [ + { + "type": "relation", + "name": "internalLink", + "value": "BlN9DFI679QC", + "isInheritable": false, + "position": 10 + }, + { + "type": "label", + "name": "iconClass", + "value": "bx bx-text", + "isInheritable": false, + "position": 20 + }, + { + "type": "relation", + "name": "internalLink", + "value": "4TIF1oA4VQRO", + "isInheritable": false, + "position": 30 + } + ], + "format": "html", + "dataFileName": "Formatting toolbar.html", + "attachments": [ + { + "attachmentId": "CZ8ENj2LsBsA", + "title": "image.png", + "role": "image", + "mime": "image/jpg", + "position": 10, + "dataFileName": "Formatting toolbar_image.png" + }, + { + "attachmentId": "iu9xb3VivIIl", + "title": "image.png", + "role": "image", + "mime": "image/jpg", + "position": 10, + "dataFileName": "1_Formatting toolbar_image.png" + }, + { + "attachmentId": "MMeih4nJVgNk", + "title": "image.png", + "role": "image", + "mime": "image/jpg", + "position": 10, + "dataFileName": "2_Formatting toolbar_image.png" + }, + { + "attachmentId": "SGaPJHzNyLLV", + "title": "image.png", + "role": "image", + "mime": "image/jpg", + "position": 10, + "dataFileName": "3_Formatting toolbar_image.png" + } + ] + }, { "isClone": false, "noteId": "S6Xx8QIWTV66", @@ -3570,7 +3562,7 @@ "S6Xx8QIWTV66" ], "title": "Lists", - "notePosition": 20, + "notePosition": 40, "prefix": null, "isExpanded": false, "type": "text", @@ -3641,30 +3633,296 @@ }, { "isClone": false, - "noteId": "FVuX89AJuFSw", + "noteId": "6f9hih2hXXZk", "notePath": [ "pOsGYCXsbNQG", "KSZ04uQ2D1St", - "FVuX89AJuFSw" + "6f9hih2hXXZk" ], "title": "Code", - "notePosition": 30, + "notePosition": 40, "prefix": null, - "isExpanded": false, + "isExpanded": true, "type": "text", - "mime": "text/html", + "mime": "text/markdown", "attributes": [ + { + "type": "label", + "name": "shareAlias", + "value": "code-notes", + "isInheritable": false, + "position": 20 + }, + { + "type": "relation", + "name": "internalLink", + "value": "CdNpE2pqjmI6", + "isInheritable": false, + "position": 30 + }, + { + "type": "relation", + "name": "internalLink", + "value": "iPIMuisry3hd", + "isInheritable": false, + "position": 40 + }, + { + "type": "relation", + "name": "internalLink", + "value": "QxEyIjRBizuC", + "isInheritable": false, + "position": 50 + }, + { + "type": "relation", + "name": "internalLink", + "value": "BlN9DFI679QC", + "isInheritable": false, + "position": 60 + }, + { + "type": "relation", + "name": "internalLink", + "value": "4TIF1oA4VQRO", + "isInheritable": false, + "position": 70 + }, + { + "type": "relation", + "name": "internalLink", + "value": "s8alTXmpFR61", + "isInheritable": false, + "position": 80 + }, { "type": "label", "name": "iconClass", "value": "bx bx-code", "isInheritable": false, - "position": 10 + "position": 90 } ], "format": "html", "dataFileName": "Code.html", - "attachments": [] + "attachments": [ + { + "attachmentId": "hajUVeLs3EOM", + "title": "image.png", + "role": "image", + "mime": "image/jpg", + "position": 10, + "dataFileName": "Code_image.png" + }, + { + "attachmentId": "iKJbcEUkME1a", + "title": "image.png", + "role": "image", + "mime": "image/jpg", + "position": 10, + "dataFileName": "1_Code_image.png" + }, + { + "attachmentId": "OTcapNOcNaBL", + "title": "image.png", + "role": "image", + "mime": "image/jpg", + "position": 10, + "dataFileName": "2_Code_image.png" + } + ], + "dirFileName": "Code", + "children": [ + { + "isClone": false, + "noteId": "CdNpE2pqjmI6", + "notePath": [ + "pOsGYCXsbNQG", + "KSZ04uQ2D1St", + "6f9hih2hXXZk", + "CdNpE2pqjmI6" + ], + "title": "Scripts", + "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", + "value": "GLks18SNjxmC", + "isInheritable": false, + "position": 20 + }, + { + "type": "relation", + "name": "internalLink", + "value": "zEY4DaJG4YT5", + "isInheritable": false, + "position": 30 + }, + { + "type": "relation", + "name": "internalLink", + "value": "5668rwcirq1t", + "isInheritable": false, + "position": 40 + }, + { + "type": "relation", + "name": "internalLink", + "value": "GPERMystNGTB", + "isInheritable": false, + "position": 50 + }, + { + "type": "relation", + "name": "imageLink", + "value": "DVJl4l3T8EG2", + "isInheritable": false, + "position": 60 + }, + { + "type": "relation", + "name": "internalLink", + "value": "wX4HbRucYSDD", + "isInheritable": false, + "position": 70 + }, + { + "type": "relation", + "name": "internalLink", + "value": "RDslemsQ6gCp", + "isInheritable": false, + "position": 80 + }, + { + "type": "label", + "name": "shareAlias", + "value": "scripts", + "isInheritable": false, + "position": 20 + } + ], + "format": "html", + "dataFileName": "Scripts.html", + "attachments": [] + }, + { + "isClone": false, + "noteId": "GLks18SNjxmC", + "notePath": [ + "pOsGYCXsbNQG", + "KSZ04uQ2D1St", + "6f9hih2hXXZk", + "GLks18SNjxmC" + ], + "title": "Script API", + "notePosition": 20, + "prefix": null, + "isExpanded": false, + "type": "text", + "mime": "text/markdown", + "attributes": [ + { + "type": "label", + "name": "shareAlias", + "value": "script-api", + "isInheritable": false, + "position": 10 + } + ], + "format": "html", + "dataFileName": "Script API.html", + "attachments": [] + }, + { + "isClone": false, + "noteId": "GPERMystNGTB", + "notePath": [ + "pOsGYCXsbNQG", + "KSZ04uQ2D1St", + "6f9hih2hXXZk", + "GPERMystNGTB" + ], + "title": "Events", + "notePosition": 40, + "prefix": null, + "isExpanded": false, + "type": "text", + "mime": "text/markdown", + "attributes": [ + { + "type": "relation", + "name": "internalLink", + "value": "zEY4DaJG4YT5", + "isInheritable": false, + "position": 10 + }, + { + "type": "relation", + "name": "internalLink", + "value": "CdNpE2pqjmI6", + "isInheritable": false, + "position": 20 + }, + { + "type": "label", + "name": "shareAlias", + "value": "events", + "isInheritable": false, + "position": 30 + } + ], + "format": "html", + "dataFileName": "Events.html", + "attachments": [] + }, + { + "isClone": false, + "noteId": "MgibgPcfeuGz", + "notePath": [ + "pOsGYCXsbNQG", + "KSZ04uQ2D1St", + "6f9hih2hXXZk", + "MgibgPcfeuGz" + ], + "title": "Custom Widgets", + "notePosition": 50, + "prefix": null, + "isExpanded": false, + "type": "text", + "mime": "text/markdown", + "attributes": [ + { + "type": "relation", + "name": "imageLink", + "value": "3sCPPL0LEC1S", + "isInheritable": false, + "position": 10 + }, + { + "type": "label", + "name": "shareAlias", + "value": "custom-widget", + "isInheritable": false, + "position": 20 + } + ], + "format": "html", + "dataFileName": "Custom Widgets.html", + "attachments": [] + } + ] }, { "isClone": false, @@ -3675,7 +3933,7 @@ "m523cpzocqaD" ], "title": "Saved Search", - "notePosition": 50, + "notePosition": 60, "prefix": null, "isExpanded": false, "type": "text", @@ -3723,7 +3981,7 @@ "joqzSrDccPKf" ], "title": "Relation Map", - "notePosition": 60, + "notePosition": 70, "prefix": null, "isExpanded": false, "type": "text", @@ -3750,7 +4008,7 @@ "bdUJEHsAPYQR" ], "title": "Note Map", - "notePosition": 70, + "notePosition": 80, "prefix": null, "isExpanded": false, "type": "text", @@ -3777,7 +4035,7 @@ "HcABDtFCkbFN" ], "title": "Render Note", - "notePosition": 90, + "notePosition": 100, "prefix": null, "isExpanded": false, "type": "text", @@ -3804,7 +4062,7 @@ "GTwFsgaA0lCt" ], "title": "Book", - "notePosition": 110, + "notePosition": 120, "prefix": null, "isExpanded": false, "type": "text", @@ -4054,7 +4312,7 @@ "s1aBHPd79XYj" ], "title": "Mermaid Diagrams", - "notePosition": 120, + "notePosition": 130, "prefix": null, "isExpanded": false, "type": "text", @@ -4161,7 +4419,7 @@ "grjYqerjn243" ], "title": "Canvas", - "notePosition": 140, + "notePosition": 150, "prefix": null, "isExpanded": false, "type": "text", @@ -4197,7 +4455,7 @@ "1vHRoWCEjj0L" ], "title": "Web View", - "notePosition": 150, + "notePosition": 160, "prefix": null, "isExpanded": false, "type": "text", @@ -4224,7 +4482,7 @@ "gBbsAeiuUxI5" ], "title": "Mind Map", - "notePosition": 160, + "notePosition": 170, "prefix": null, "isExpanded": false, "type": "text", @@ -4251,7 +4509,7 @@ "81SGnPGMk7Xc" ], "title": "Geo map", - "notePosition": 170, + "notePosition": 180, "prefix": null, "isExpanded": false, "type": "text", @@ -6192,6 +6450,25 @@ "format": "html", "dataFileName": "Synchronization fails with 504.html", "attachments": [] + }, + { + "isClone": false, + "noteId": "s8alTXmpFR61", + "notePath": [ + "pOsGYCXsbNQG", + "BgmBlOIl72jZ", + "s8alTXmpFR61" + ], + "title": "Refreshing the application", + "notePosition": 60, + "prefix": null, + "isExpanded": false, + "type": "text", + "mime": "text/html", + "attributes": [], + "format": "html", + "dataFileName": "Refreshing the application.html", + "attachments": [] } ] }, diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases.html b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases.html index 5e3d47e0f..f850bd6ee 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases.html @@ -13,7 +13,7 @@

Advanced Showcases

-

Trilium offers advanced functionality through Scripts and +

Trilium offers advanced functionality through Scripts and Promoted Attributes. To illustrate these features, we've prepared several showcases available in the demo notes:

diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Task Manager.html b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Task Manager.html index dac08e985..0666d4c7d 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Task Manager.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Task Manager.html @@ -15,7 +15,7 @@

Task Manager is a promoted attributes and scriptsshowcase present in the demo notes.

+ href="../../Note%20Types/Code/Scripts.html">scriptsshowcase present in the demo notes.

Demo

@@ -42,8 +42,8 @@

Task template defines several promoted attributes - todoDate, doneDate, tags, location. Importantly it also defines ~runOnAttributeChange relation - - event handler which is run on - attribute change. This script handles + - event handler which is + run on attribute change. This script 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.

@@ -74,7 +74,7 @@

In the demo screenshot above you may notice that TODO tasks are in red color and DONE tasks are green.

-

This is done by having this CSS code note which +

This is done by having this CSS code note which defines extra CSS classes:

span.fancytree-node.todo .fancytree-title {
     color: red !important;
@@ -83,7 +83,7 @@
 span.fancytree-node.done .fancytree-title {
     color: green !important;
 }
-

This code note has #appCss +

This code note has #appCss labelwhich is recognized by Trilium on startup and loaded as CSS into the application.

diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Weight Tracker.html b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Weight Tracker.html index 9efef1a86..2060f0b5c 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Weight Tracker.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Weight Tracker.html @@ -16,7 +16,7 @@

-

The Weight Tracker is a Script API showcase +

The Weight Tracker is a Script API showcase present in the demo notes.

By adding weight as a promoted attribute in the template from which day notes are @@ -26,11 +26,11 @@

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 can + a placeholder where a script can render its output.

Scripts for Render Notes are defined in a relation called ~renderNote. In this example, it's the Weight Tracker's child Implementation. - The Implementation consists of two code notes that + The Implementation consists of two code notes that contain some HTML and JavaScript respectively, which load all the notes with a weight attribute and display their values in a chart.

To actually render the chart, we're using a third party library called @@ -40,7 +40,7 @@

Code

-

Here's the content of the script which is placed in a code note of +

Here's the content of the script which is placed in a code note of type JS Frontend:

async function getChartData() {
     const days = await api.runOnBackend(async () => {
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Code Notes.html b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Code Notes.html
deleted file mode 100644
index 8611432de..000000000
--- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Code Notes.html	
+++ /dev/null
@@ -1,53 +0,0 @@
-
-  
-  
-    
-    
-    
-    
-    Code Notes
-  
-  
-  
-    
-

Code Notes

- -
-

Trilium supports creating "code" notes, i.e. notes which contain some - sort of formal code - be it programming language (C++, JavaScript), structured - data (JSON, XML) or other types of codes (CSS etc.).

-

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 -
    • -
    -
  • -
  • JSON, XML etc. can be used as storage for structured data (typically used - in conjunction with scripting)
  • -
-

- -

- -

Extra languages

- -

Trilium supports syntax highlighting for many languages, but by default - displays only some of them (to reduce the number of items). You can add - extra languages in Options -> Code notes.

- -

Code blocks

- -

An alternative to the code note is a "code block" - feature of a text - note which can add short snippets of code to the text editor. Starting - with TriliumNext v0.90.12, the code blocks also support syntax highlighting.

-

- -

-
-
- - - \ No newline at end of file diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Custom Request Handler.html b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Custom Request Handler.html index d0108c00c..39104417b 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Custom Request Handler.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Custom Request Handler.html @@ -13,7 +13,7 @@

Custom Request Handler

-

Trilium provides a mechanism for scripts to +

Trilium provides a mechanism for scripts 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).

@@ -22,7 +22,7 @@

Let's take a look at an example. The goal is to provide a REST endpoint to which we can send title and content and Trilium will create a note.

-

We'll start with creating a JavaScript backend code note containing:

+

We'll start with creating a JavaScript backend code note containing:

const {req, res} = api;
 const {secret, title, content} = req.body;
 
@@ -74,7 +74,7 @@ Content-Type: application/json
           and you need to take care of this yourself.

Once we pass these checks we will just create the desired note using Script API.

+ href="../Note%20Types/Code/Script%20API.html">Script API.

Custom resource provider

diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing.html b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing.html index b4a2e423d..b46cddaf5 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing.html @@ -82,7 +82,7 @@

The default shared page is basic in design, but you can customize it using your own CSS:

    -
  • Custom CSS: Link a CSS code note to +
  • Custom CSS: Link a CSS code note to the shared page by adding a ~shareCss relation to the note. If you want this style to apply to the entire subtree, make the label inheritable. You can hide the CSS code note from the tree navigation by adding the #shareHiddenFromTree label.
  • diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Keyboard Shortcuts.html b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Keyboard Shortcuts.html index 8069a42d9..aa178c56b 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Keyboard Shortcuts.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Keyboard Shortcuts.html @@ -91,8 +91,8 @@

    Editing notes

    Trilium uses CKEditor 5 for the text notes and - CodeMirror 5 for code notes. - Check the documentation of these projects to see all their built-in keyboard + CodeMirror 5 for code notes. Check + the documentation of these projects to see all their built-in keyboard shortcuts.

    • ALT-F10 - bring up inline formatting toolbar (arrow keys <-,-> to diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note.html b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note.html index dbf437cff..0042fb904 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note.html @@ -21,13 +21,13 @@
      • text note - this is default note type which allows you to put rich text, images etc.
      • -
      • code note - some kind - of formal code, typically programming language (e.g. JavaScript) or data - structure (e.g. JSON)
      • +
      • code note - some kind of formal + code, typically programming language (e.g. JavaScript) or data structure + (e.g. JSON)
      • image note - 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 +
      • render HTML note - this works as an output screen of attached scripts
      • saved search note - contains saved search query and dynamically displays result of the search as its diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note/Attachments.html b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note/Attachments.html index 8e3f8785e..97e1cb656 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note/Attachments.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note/Attachments.html @@ -16,7 +16,7 @@

        A note 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. +

        This can be especially useful to include dependencies for your scripts. The Weight Tracker shows how to use chartjs which is attached to the script note.

        diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note/Read-Only Notes.html b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note/Read-Only Notes.html index fc590d052..adaac6248 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note/Read-Only Notes.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note/Read-Only Notes.html @@ -13,7 +13,7 @@

        Read-Only Notes

        -

        Both text and code notes +

        Both text and code 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.

        diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Themes.html b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Themes.html index 4d23c846c..3bc46571d 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Themes.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Themes.html @@ -28,7 +28,7 @@

        Trilium supports custom user themes, allowing you to personalize the application's appearance. To create a custom theme, follow these steps:

          -
        1. Create a CSS Code Note: Start by creating a new code note with +
        2. Create a CSS Code Note: Start by creating a new code note with the CSS type.
        3. Annotate with **#appTheme**: Add the attribute #appTheme=my-theme-name to your note, where my-theme-name is the name of your custom theme.
        4. @@ -122,7 +122,7 @@ body .CodeMirror {

          To use custom CSS:

            -
          1. Create a CSS Code Note: Create a new code note with +
          2. Create a CSS Code Note: Create a new code note with the CSS type.
          3. Add the **appCss** Label: Annotate the note with the #appCss label.
          4. diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/UI Elements/Options.html b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/UI Elements/Options.html new file mode 100644 index 000000000..102bb6907 --- /dev/null +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/UI Elements/Options.html @@ -0,0 +1,19 @@ + + + + + + + + Options + + + +
            +

            Options

            + +
            +
            + + + \ No newline at end of file diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/UI Elements/Ribbon.html b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/UI Elements/Ribbon.html new file mode 100644 index 000000000..b1a9038dd --- /dev/null +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/UI Elements/Ribbon.html @@ -0,0 +1,30 @@ + + + + + + + + Ribbon + + + +
            +

            Ribbon

            + +
            +
            + +
            +

            The ribbon allows changing options, attributes and viewing information + about the current note.

            +

            Settings

            +

            It is possible to change whether some ribbon items will be automatically + open when navigating to a new note. To do so, in Settings, go to Appearance and look for the Ribbon widgets section.

            +
            +
            + + + \ No newline at end of file diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/UI Elements/Ribbon_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/UI Elements/Ribbon_image.png new file mode 100644 index 000000000..95fc8e664 Binary files /dev/null and b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/UI Elements/Ribbon_image.png differ diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Developer Guides/Frontend Basics.html b/src/public/app/doc_notes/en/User Guide/User Guide/Developer Guides/Frontend Basics.html index d51ab300d..b679700ed 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Developer Guides/Frontend Basics.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Developer Guides/Frontend Basics.html @@ -19,7 +19,7 @@ the current app and note context, and widgets that export an object to Trilium to be used in the UI. In both cases, the frontend api of Trilium is available to scripts running in the frontend context as global variable api. - The members and methods of the api can be seen on the Script API page.

            + The members and methods of the api can be seen on the Script API page.

            Scripts

            diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Developer Guides/Widget Basics.html b/src/public/app/doc_notes/en/User Guide/User Guide/Developer Guides/Widget Basics.html index 1bc37bad4..5c44d672a 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Developer Guides/Widget Basics.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Developer Guides/Widget Basics.html @@ -96,7 +96,7 @@ module.exports = new MyWidget();

Step 4: Adding User Interaction

Let’s make the button interactive by showing a message when it’s clicked. - We'll use the api.showMessage method from the Script API.

+ We'll use the api.showMessage method from the Script API.

class MyWidget extends api.BasicWidget {
     get position() { return 1; }
     get parentWidget() { return "left-pane"; }
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/FAQ.html b/src/public/app/doc_notes/en/User Guide/User Guide/FAQ.html
index 732a09deb..1c90d07fb 100644
--- a/src/public/app/doc_notes/en/User Guide/User Guide/FAQ.html	
+++ b/src/public/app/doc_notes/en/User Guide/User Guide/FAQ.html	
@@ -52,7 +52,7 @@
           
  • 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 scriptingsupport would be a XSS security hole, while with the single + href="Note%20Types/Code/Scripts.html">scriptingsupport would be a XSS security hole, while with the single user assumption it's an endless customizable tool.
  • diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Mobile Frontend.html b/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Mobile Frontend.html index 32370255d..63a6e917d 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Mobile Frontend.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Mobile Frontend.html @@ -59,7 +59,7 @@

    Scripting

    -

    You can alter the behavior with scripts just +

    You can alter the behavior with scripts just like for normal frontend. For script notes to be executed, they need to have labeled #run=mobileStartup.

    diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/1_Code_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/1_Code_image.png new file mode 100644 index 000000000..7520e45c1 Binary files /dev/null and b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/1_Code_image.png differ diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/1_Code Notes_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/2_Code_image.png similarity index 100% rename from src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/1_Code Notes_image.png rename to src/public/app/doc_notes/en/User Guide/User Guide/Note Types/2_Code_image.png diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Code.html b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Code.html index b1b6dc876..e6135209c 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Code.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Code.html @@ -12,7 +12,51 @@

    Code

    -
    +
    +

    Trilium supports creating "code" notes, i.e. notes which contain some + sort of formal code - be it programming language (C++, JavaScript), structured + data (JSON, XML) or other types of codes (CSS etc.).

    +

    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 +
      • +
      +
    • +
    • 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 notes, see Code blocks.

    +
    + +
    +

    Adjusting the language of a code note

    +

    In the Ribbon, + look for the Note type selector and click it to reveal the possible + note types. Inside of it there will be a section called Code, select + any one of the languages.

    +

    + +

    +

    Adjusting the list of languages

    +

    Trilium supports syntax highlighting for many languages, but by default + displays only some of them. The supported languages can be adjusted by + going to Options, + then Code Notes and looking for the Available MIME types in the dropdown section. + Simply check any of the items to add them to the list, or un-check them + to remove them from the list.

    +

    Note that the list of languages is not immediately refreshed, you'd have + to manually refresh the application.

    +

    The list of languages is also shared with the Code blocks feature of  + Text notes.

    +
    diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Code Notes/Custom Widgets.html b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Code/Custom Widgets.html similarity index 100% rename from src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Code Notes/Custom Widgets.html rename to src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Code/Custom Widgets.html diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Code Notes/Events.html b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Code/Events.html similarity index 97% rename from src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Code Notes/Events.html rename to src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Code/Events.html index 1a1270aab..e50eda77f 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Code Notes/Events.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Code/Events.html @@ -36,7 +36,7 @@

    Entity events

    -

    Other events are bound to some entity, these are defined as relations - +

    Other events are bound to some entity, these are defined as relations - meaning that script is triggered only if note has this script attached to it through relations (or it can inherit it).

      diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Code Notes/Script API.html b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Code/Script API.html similarity index 100% rename from src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Code Notes/Script API.html rename to src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Code/Script API.html diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Code Notes/Scripts.html b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Code/Scripts.html similarity index 87% rename from src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Code Notes/Scripts.html rename to src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Code/Scripts.html index d770af7aa..ea4fdb5db 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Code Notes/Scripts.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Code/Scripts.html @@ -13,10 +13,10 @@

      Scripts

      -

      Trilium supports creating code 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 Script API provide +

      Trilium supports creating code 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 Script API provide extra functionality.

      Scripting

      @@ -36,7 +36,7 @@

      Button use case

      -

      Let's take a look at our demo script (shipped with default Trilium database) +

      Let's take a look at our demo script (shipped with default Trilium database) - Task manager. One of the things this script does is adding a button to the Trilium interface which will allow user to easily add new Task (TODO item).

      @@ -74,7 +74,7 @@ by Trilium runtime so when we restart Trilium, button won't be there.

      We need to execute it every time Trilium starts up, but we probably don't want to have to manually click on play button on every start up.

      -

      The solution is marked by red circle at the bottom - this note has label #run=frontendStartup - +

      The solution is marked by red circle at the bottom - this note has label #run=frontendStartup - this is one of the "system" labels which Trilium understands. As you might guess, this will cause all such labeled script notes to be executed once Trilium frontend starts up.

      @@ -83,7 +83,7 @@

      More showcases

      -

      You can see more scripting with explanation in Advanced showcases +

      You can see more scripting with explanation in Advanced showcases

      Events

      diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Code Notes_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Code_image.png similarity index 100% rename from src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Code Notes_image.png rename to src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Code_image.png diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/1_Code blocks_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/1_Code blocks_image.png new file mode 100644 index 000000000..ef28ed50d Binary files /dev/null and b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/1_Code blocks_image.png differ diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/1_Formatting toolbar_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/1_Formatting toolbar_image.png new file mode 100644 index 000000000..bc6bd96c4 Binary files /dev/null and b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/1_Formatting toolbar_image.png differ diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/2_Code blocks_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/2_Code blocks_image.png new file mode 100644 index 000000000..3d13d72b5 Binary files /dev/null and b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/2_Code blocks_image.png differ diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/2_Formatting toolbar_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/2_Formatting toolbar_image.png new file mode 100644 index 000000000..c7d879eba Binary files /dev/null and b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/2_Formatting toolbar_image.png differ diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/3_Formatting toolbar_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/3_Formatting toolbar_image.png new file mode 100644 index 000000000..3270223e2 Binary files /dev/null and b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/3_Formatting toolbar_image.png differ diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Code blocks.html b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Code blocks.html new file mode 100644 index 000000000..4c687098e --- /dev/null +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Code blocks.html @@ -0,0 +1,78 @@ + + + + + + + + Code blocks + + + +
      +

      Code blocks

      + +
      +
      + +
      +

      The code blocks feature allows entering pieces of code in text notes.

      +

      Note that this feature is meant for generally small snippets of code. + For larger files such as an entire log, see the dedicated [missing note] note + type instead.

      +

      Inserting a code block

      +
        +
      • Via the Formatting toolbar, + look for the + button. +
          +
        • Pressing directly on the icon will insert a code block with the language + that was selected most recently. If this is the first time a code block + is inserted, the language will be “Auto-detected” by default.
        • +
        • Pressing the arrow next to the icon, which will show a popup with the + available languages.
        • +
        +
      • +
      • Type ``` (as in Markdown). +
          +
        • Note that it's not possible to specify the language, as it will default + to the last selected language.
        • +
        +
      • +
      +

      Syntax highlighting

      +

      Since TriliumNext v0.90.12, Trilium will try to offer syntax highlighting + to the code block. Note that the syntax highlighting mechanism is slightly + different than the one in Code Notes notes + as different technologies are involved.

      +

      When the language is set to Auto-detected, Trilium will try to identify + the programming language (or similar) that corresponds to the given snippet + of text and highlight it. If this is problematic, consider changing the + language of the code block manually.

      +

      When the language is set to Plain text, there will be no syntax + highlighting.

      +

      Changing the language of a code block

      +

      Simply click anywhere inside the code block and press again the code block + button in the Formatting toolbar: +
      + +

      +

      Adjusting the list of languages

      +

      The code blocks feature shares the list of languages with the  + Code Notes note type.

      +

      The supported languages can be adjusted by going to Options, then Code Notes and + looking for the Available MIME types in the dropdown section. Simply + check any of the items to add them to the list, or uncheck them to remove + them from the list.

      +

      Note that the list of languages is not immediately refreshed, you'd have + to manually refresh the application.

      +

       

      +
      +
      + + + \ No newline at end of file diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Code blocks_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Code blocks_image.png new file mode 100644 index 000000000..0ba15d321 Binary files /dev/null and b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Code blocks_image.png differ diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Formatting toolbar.html b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Formatting toolbar.html new file mode 100644 index 000000000..df83c4b4e --- /dev/null +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Formatting toolbar.html @@ -0,0 +1,60 @@ + + + + + + + + Formatting toolbar + + + +
      +

      Formatting toolbar

      + +
      +

      Trilium allows two different editing experiences for text notes, based + on your preference.

      +

      To do so, go to Options and + look for the Text Notes section. There is a corresponding section + called Formatting toolbar.

      +

      Floating

      +

      The floating bar is a more minimalist option, in which the formatting + is hidden behind two different popups.

      +

      Block-level popup

      +

      The first popup is the block-level popup. This will appear to the left + of the current paragraph you are currently editing, as a sequence of dots: +
      + +

      +

      Clicking this popup will reveal the formatting options that are specific + to the entire paragraph, such as setting a heading, lists, tables, etc.

      +

      + +

      +

      Inline popup

      +

      The inline popup appears automatically when selecting a text:

      +

      + +

      +

      All the options here apply only to the selected portion of text, such + as changing the font size, or making the text bold.

      +

      Fixed

      +

      The fixed formatting offers a more traditional editing paradigm, usually + useful if a lot of formatting is needed.

      +

      All the options are combined into a single toolbar that will appear as + part of the Ribbon.

      +
      + +
      +

      By default, if the toolbar does not fit on the screen, the rest of the + options will be grouped into a single option at the end. It is possible + to display items on multiple lines by checking the corresponding option + in the Formatting toolbar section.

      +
      +
      + + + \ No newline at end of file diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Formatting toolbar_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Formatting toolbar_image.png new file mode 100644 index 000000000..85578b78e Binary files /dev/null and b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Formatting toolbar_image.png differ diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Troubleshooting.html b/src/public/app/doc_notes/en/User Guide/User Guide/Troubleshooting.html index 736859d17..86908cbb6 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Troubleshooting.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Troubleshooting.html @@ -37,7 +37,7 @@

      Broken Script Prevents Application Startup

      If a custom script causes Triliumto crash, and it is set as a startup - script or in an active custom widget, + script or in an active custom widget, start Triliumin "safe mode" to prevent any custom scripts from executing:

      TRILIUM_SAFE_MODE=true ./trilium

      Depending on your Trilium distribution, you may have pre-made scripts diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Troubleshooting/Refreshing the application.html b/src/public/app/doc_notes/en/User Guide/User Guide/Troubleshooting/Refreshing the application.html new file mode 100644 index 000000000..37e34fa9d --- /dev/null +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Troubleshooting/Refreshing the application.html @@ -0,0 +1,23 @@ + + + + + + + + Refreshing the application + + + +

      +

      Refreshing the application

      + +
      +

      Some changes to the application will not take effect immediately and as + such it might require to manually reload or refresh the application.

      +

      To do so, simply press Ctrl+Shift+R.

      +
      +
      + + + \ No newline at end of file diff --git a/src/public/app/doc_notes/en/User Guide/navigation.html b/src/public/app/doc_notes/en/User Guide/navigation.html index cc4ada9c8..7edad42b6 100644 --- a/src/public/app/doc_notes/en/User Guide/navigation.html +++ b/src/public/app/doc_notes/en/User Guide/navigation.html @@ -34,20 +34,6 @@
    -
  • Code Notes - -
  • Advanced Showcases
  • Note @@ -183,13 +173,27 @@
  • Attachments