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:
- Selecting text to bring up an inline toolbar.
2. Clicking on the block toolbar.
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.
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:
- Bold: Type
**text**
or__text__
- Italic: Type
*text*
or_text_
Code
: Type `text`Strikethrough: Type~~text~~
- Bulleted list: Start a line with
*
or-
followed by a space - Numbered list: Start a line with
1.
or1)
followed by a space - To-do list: Start a line with
[ ]
for an unchecked item or[x]
for a checked item
- Block quote: Start a line with
>
followed by a space
To 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:
- Select the desired text and cut it to the clipboard.
- Create a new sub-note and name it.
- Paste the content from the clipboard into the sub-note.
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.