Docs

Text Notes

Trilium utilizes the powerful CKEditor 5 as its text editing component.

Formatting Options

The Trilium text note interface does not display toolbars or formatting options by default. These can be accessed by:

inline note formatting

  1. Selecting text to bring up an inline toolbar.

formating note block

  1. Clicking on the block toolbar.

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:

In both cases, it is possible to switch back to editable mode.

General Formatting

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:

Lists

Blocks

Multi-Line Code Blocks

To create a multi-line code block, start a line with “```[lang]”, for example:

if (1 > 2) {
    console.log("Error in the matrix");
}

Headings

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.

Horizontal Line

Insert a horizontal line by starting a line with ---.

Markdown & Autoformat

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.

Math Support

Trilium provides math support through KaTeX.

Cutting Selection to Sub-Note

When editing a document that becomes too large, you can split it into sub-notes:

  1. Select the desired text and cut it to the clipboard.
  2. Create a new sub-note and name it.
  3. 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.

Including a Note

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.