feat(docs): improve documentation for read-only notes

This commit is contained in:
Elian Doran
2025-04-04 23:08:17 +03:00
parent 65ddfe8776
commit 65e914f916
48 changed files with 261 additions and 180 deletions

View File

@@ -1,12 +1,44 @@
# Read-Only Notes
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.
Some note types such as [Text](../../Note%20Types/Text.md) and [Code](../../Note%20Types/Code.md) notes in Trilium can be set to read-only. When a note is in read-only mode, it is presented to the user in a non-editable view, with the option to switch to editing mode if needed.
## Setting Read-Only Mode with a Label
To set a note as read-only, add the `readOnly` [label](../../Advanced%20Usage/Attributes.md) to the note.
## Automatic Read-Only Mode
## Automatic read-only mode
For optimization purposes, Trilium will automatically set very large notes to read-only. Displaying such lengthy notes in editing mode can slow down performance, especially when editing is unnecessary.
If you want to ensure that a specific note remains editable regardless of its size, you can add the `autoReadOnlyDisabled` [label](../../Advanced%20Usage/Attributes.md) to the note.
This behavior can be disabled on a per-note basis, by following the instructions of the next section.
In addition, it's possible to change the number of characters at which the automatic read-only mode will trigger in [Options](../UI%20Elements/Options.md) by going to the options for [Text](../../Note%20Types/Text.md) and [Code](../../Note%20Types/Code.md) notes.
## Changing a note's read-only behavior
Via the [Ribbon](../UI%20Elements/Ribbon.md), by going to the _Basic Properties_ tab and looking for the _Editable_ selection. The following options are possible:
* **Auto**
This is the default behavior in which the note will be editable by default, unless it becomes large enough to trigger read-only mode.
* **Read-only**
The note will be always marked as read-only, regardless of its size. Nevertheless, it's still possible to temporarily edit the note if needed. This is generally useful for notes that are not prone to change.
* **Always Editable**
This option will bypass the automatic read-only activation for this particular note. It's useful for large notes that are frequently edited.
If the _Editable_ section is missing from the ribbon, then the note type does not support read-only mode.
### Manually setting the options
Apart from using the ribbon as previously mentioned, it's also possible to use [labels](../../Advanced%20Usage/Attributes.md) to change the behavior:
* To set as read-only, apply the `readOnly` label to the note.
* To disable automatic read-only (always editable), apply the `autoReadOnlyDisabled` label.
## Temporarily editing a read-only note
When accessing a read-only note, it's possible to temporarily edit it by using the ![](Read-Only%20Notes_image.png) button in the [Floating buttons](../UI%20Elements/Floating%20buttons.md) area.
When pressed, the note will become editable but will become read-only again after navigating to a different note.
## Special read-only behavior
Some note types have a special behavior based on whether the read-only mode is enabled:
* [Mermaid Diagrams](#root/rswjxUmAz64R/aOI0RYfC3wic/ObWG9tSNscDb) will hide the Mermaid source code and display the diagram preview in full-size. In this case, the read-only mode can be easily toggled on or off via a dedicated button in the [Floating buttons](../UI%20Elements/Floating%20buttons.md) area.

Binary file not shown.

After

Width:  |  Height:  |  Size: 429 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 515 KiB

After

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 176 KiB

After

Width:  |  Height:  |  Size: 815 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 815 B

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 397 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 359 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 397 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 359 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 323 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 323 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 260 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 260 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 515 KiB

View File

@@ -1,5 +1,5 @@
# Geo Map
![](11_Geo%20Map_image.png)
![](10_Geo%20Map_image.png)
This note type displays the children notes on a geographical map, based on an attribute. It is also possible to add new notes at a specific location using the built-in interface.
@@ -7,8 +7,8 @@ This note type displays the children notes on a geographical map, based on an at
| | | |
| --- | --- | --- |
| 1 | ![](8_Geo%20Map_image.png) | Right click on any note on the note tree and select _Insert child note__Geo Map (beta)_. |
| 2 | ![](10_Geo%20Map_image.png) | By default the map will be empty and will show the entire world. |
| 1 | ![](7_Geo%20Map_image.png) | Right click on any note on the note tree and select _Insert child note__Geo Map (beta)_. |
| 2 | ![](9_Geo%20Map_image.png) | By default the map will be empty and will show the entire world. |
## Repositioning the map
@@ -21,16 +21,16 @@ The position on the map and the zoom are saved inside the map note and restored
| | | |
| --- | --- | --- |
| 1 | To create a marker, first navigate to the desired point on the map. Then press the ![](12_Geo%20Map_image.png) button in the [Floating buttons](../Basic%20Concepts%20and%20Features/UI%20Elements/Floating%20buttons.md) (top-right) area. <br> <br>If the button is not visible, make sure the button section is visible by pressing the chevron button (![](19_Geo%20Map_image.png)) in the top-right of the map. | |
| 2 | ![](3_Geo%20Map_image.png) | Once pressed, the map will enter in the insert mode, as illustrated by the notification.    <br> <br>Simply click the point on the map where to place the marker, or the Escape key to cancel. |
| 3 | ![](9_Geo%20Map_image.png) | Enter the name of the marker/note to be created. |
| 4 | ![](18_Geo%20Map_image.png) | Once confirmed, the marker will show up on the map and it will also be displayed as a child note of the map. |
| 1 | To create a marker, first navigate to the desired point on the map. Then press the ![](11_Geo%20Map_image.png) button in the [Floating buttons](../Basic%20Concepts%20and%20Features/UI%20Elements/Floating%20buttons.md) (top-right) area. <br> <br>If the button is not visible, make sure the button section is visible by pressing the chevron button (![](17_Geo%20Map_image.png)) in the top-right of the map. | |
| 2 | ![](2_Geo%20Map_image.png) | Once pressed, the map will enter in the insert mode, as illustrated by the notification.    <br> <br>Simply click the point on the map where to place the marker, or the Escape key to cancel. |
| 3 | ![](8_Geo%20Map_image.png) | Enter the name of the marker/note to be created. |
| 4 | ![](16_Geo%20Map_image.png) | Once confirmed, the marker will show up on the map and it will also be displayed as a child note of the map. |
## How the location of the markers is stored
The location of a marker is stored in the `#geolocation` attribute of the child notes:
![](20_Geo%20Map_image.png)
![](18_Geo%20Map_image.png)
This value can be added manually if needed. The value of the attribute is made up of the latitude and longitude separated by a comma.
@@ -70,9 +70,9 @@ The value of the attribute is made up of the latitude and longitude separated by
| | | |
| --- | --- | --- |
| 1 | ![](14_Geo%20Map_image.png) | Go to Google Maps on the web and look for a desired location, right click on it and a context menu will show up.    <br> <br>Simply click on the first item displaying the coordinates and they will be copied to clipboard.    <br> <br>Then paste the value inside the text box into the `#geolocation` attribute of a child note of the map (don't forget to surround the value with a `"` character). |
| 2 | ![](5_Geo%20Map_image.png) | In Trilium, create a child note under the map. |
| 3 | ![](13_Geo%20Map_image.png) | And then go to Owned Attributes and type `#geolocation="`, then paste from the clipboard as-is and then add the ending `"` character. Press Enter to confirm and the map should now be updated to contain the new note. |
| 1 | ![](13_Geo%20Map_image.png) | Go to Google Maps on the web and look for a desired location, right click on it and a context menu will show up.    <br> <br>Simply click on the first item displaying the coordinates and they will be copied to clipboard.    <br> <br>Then paste the value inside the text box into the `#geolocation` attribute of a child note of the map (don't forget to surround the value with a `"` character). |
| 2 | ![](4_Geo%20Map_image.png) | In Trilium, create a child note under the map. |
| 3 | ![](12_Geo%20Map_image.png) | And then go to Owned Attributes and type `#geolocation="`, then paste from the clipboard as-is and then add the ending `"` character. Press Enter to confirm and the map should now be updated to contain the new note. |
### Adding from OpenStreetMap
@@ -82,7 +82,7 @@ Similarly to the Google Maps approach:
| --- | --- | --- |
| 1 | ![](1_Geo%20Map_image.png) | Go to any location on openstreetmap.org and right click to bring up the context menu. Select the “Show address” item. |
| 2 | ![](Geo%20Map_image.png) | The address will be visible in the top-left of the screen, in the place of the search bar.    <br> <br>Select the coordinates and copy them into the clipboard. |
| 3 | ![](6_Geo%20Map_image.png) | Simply paste the value inside the text box into the `#geolocation` attribute of a child note of the map and then it should be displayed on the map. |
| 3 | ![](5_Geo%20Map_image.png) | Simply paste the value inside the text box into the `#geolocation` attribute of a child note of the map and then it should be displayed on the map. |
## Adding GPS tracks (.gpx)
@@ -90,13 +90,13 @@ Trilium has basic support for displaying GPS tracks on the geo map.
| | | |
| --- | --- | --- |
| 1 | ![](4_Geo%20Map_image.png) | To add a track, simply drag & drop a .gpx file inside the geo map in the note tree. |
| 2 | ![](16_Geo%20Map_image.png) | In order for the file to be recognized as a GPS track, it needs to show up as `application/gpx+xml` in the _File type_ field. |
| 3 | ![](7_Geo%20Map_image.png) | When going back to the map, the track should now be visible.    <br> <br>The start and end points of the track are indicated by the two blue markers. |
| 1 | ![](3_Geo%20Map_image.png) | To add a track, simply drag & drop a .gpx file inside the geo map in the note tree. |
| 2 | ![](15_Geo%20Map_image.png) | In order for the file to be recognized as a GPS track, it needs to show up as `application/gpx+xml` in the _File type_ field. |
| 3 | ![](6_Geo%20Map_image.png) | When going back to the map, the track should now be visible.    <br> <br>The start and end points of the track are indicated by the two blue markers. |
## Troubleshooting
![](15_Geo%20Map_image.png)
![](14_Geo%20Map_image.png)
### Grid-like artifacts on the map

View File

@@ -13,14 +13,7 @@ The Trilium text note interface does not display toolbars or formatting options
## Read-Only vs. Editing Mode
Text notes are usually opened in edit mode. However, they may open in read-only mode under the following circumstances:
* The note is long and would take time to load, so it is opened in read-only mode by default for quicker access.
* The note has a `readOnly` [label](../Advanced%20Usage/Attributes.md).
In both cases, it is possible to switch back to editable mode using the ![](Text_bx-edit-alt.svg)button at top right of page.
For more information, see [Read-Only Notes](../Basic%20Concepts%20and%20Features/Notes/Read-Only%20Notes.md).
Text notes are usually opened in edit mode. However, they may open in read-only mode if the note is too big or the note is explicitly marked as read-only. For more information, see [Read-Only Notes](../Basic%20Concepts%20and%20Features/Notes/Read-Only%20Notes.md).
## General Formatting