Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit 3a984ff

Browse files
committed
feat(docs): color schemes for code notes
1 parent 588a9dc commit 3a984ff

File tree

5 files changed

+33
-11
lines changed

5 files changed

+33
-11
lines changed

apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Code.html

Lines changed: 15 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Text/Developer-specific formatting/Code blocks.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/Developer Guide/!!!meta.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,18 +88,18 @@
8888
"mime": "text/html",
8989
"attributes": [
9090
{
91-
"type": "label",
92-
"name": "iconClass",
93-
"value": "bx bx-package",
91+
"type": "relation",
92+
"name": "internalLink",
93+
"value": "BRhQZHgwaGyw",
9494
"isInheritable": false,
9595
"position": 10
9696
},
9797
{
98-
"type": "relation",
99-
"name": "internalLink",
100-
"value": "BRhQZHgwaGyw",
98+
"type": "label",
99+
"name": "iconClass",
100+
"value": "bx bx-package",
101101
"isInheritable": false,
102-
"position": 20
102+
"position": 10
103103
}
104104
],
105105
"format": "markdown",

docs/User Guide/User Guide/Note Types/Code.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,12 @@ Trilium supports syntax highlighting for many languages, but by default displays
2424

2525
Note that the list of languages is not immediately refreshed, you'd have to manually [refresh the application](../Troubleshooting/Refreshing%20the%20application.md).
2626

27-
The list of languages is also shared with the [Code blocks](Text/Developer-specific%20formatting/Code%20blocks.md) feature of [Text](Text.md) notes.
27+
The list of languages is also shared with the [Code blocks](Text/Developer-specific%20formatting/Code%20blocks.md) feature of [Text](Text.md) notes.
28+
29+
## Color schemes
30+
31+
Since Trilium 0.94.0 the colors of code notes can be customized by going <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Options.md">Options</a> → Code Notes and looking for the _Appearance_ section.
32+
33+
> [!NOTE]
34+
> **Why are there only a few themes whereas the code block themes for text notes have a lot?**
35+
> The reason is that Code notes use a different technology than the one used in Text notes, and as such there is a more limited selection of themes. If you find a CodeMirror 6 (not 5) theme that you would like to use, let us know and we might consider adding it to the set of default themes. There is no possibility of adding new themes (at least for now), since the themes are defined in JavaScript and not at CSS level.

docs/User Guide/User Guide/Note Types/Text/Developer-specific formatting/Code blocks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Note that this feature is meant for generally small snippets of code. For larger
1313
* Type ` ``` ` (as in Markdown).
1414
* Note that it's not possible to specify the language, as it will default to the last selected language.
1515

16-
## Syntax highlighting
16+
## Syntax highlighting & color schemes
1717

1818
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 <a class="reference-link" href="../../Code.md">Code</a> notes as different technologies are involved.
1919

0 commit comments

Comments
 (0)