Trilium utilizes the powerful CKEditor 5 as its text editing component.
The Trilium text note interface does not display toolbars or formatting options by default. These can be accessed by:
Text notes are usually opened in edit mode. However, they may open in read-only mode under the following circumstances:
readOnly
label.In both cases, it is possible to switch back to editable mode.
Since Trilium uses CKEditor, all of its formatting options are available here. You may use the graphical toolbar shown above, or enter formatting such as markdown markdown directly in the text. Examples include:
**text**
or __text__
*text*
or _text_
Code
: Type `text`~~text~~
*
or -
followed by a space1.
or 1)
followed by a space[ ]
for an unchecked item or [x]
for a checked item>
followed by a spaceTo create a multi-line code block, start a line with “```[lang]”, for example:
if (1 > 2) {
console.log("Error in the matrix");
}
Create headings by starting a line with ##
for heading 2, ###
for heading 3, and so on up to heading 6. Note that #
is reserved for the title.
Insert a horizontal line by starting a line with ---
.
CKEditor supports a markdown-like editing experience, recognizing syntax and automatically converting it to rich text.
Complete documentation for this feature is available in the CKEditor documentation.
If autoformatting is not desirable, press CTRL-Z
to revert the text to its original form.
Note: The use of #
for Heading 1 is not supported because it is reserved for the title. Start with ##
for Heading 2. More information is available here.
Trilium provides math support through KaTeX.
When editing a document that becomes too large, you can split it into sub-notes:
Trilium can automate this process. Select some text within the note, and in the selection toolbar, click the scissors icon for the “cut & pasted selection to sub-note” action. The heading is automatically detected and the new sub-note is named accordingly. You can also assign a keyboard shortcut for this action. This functionality is available through the block toolbar icon.
Text notes can “include” another note as a read only widget. This can be useful for e.g. including a dynamically generated chart (from scripts & “render HTML” note) or other more advanced use cases.
This functionality is available in the block toolbar icon.