Skip to content

Latest commit

 

History

History
90 lines (53 loc) · 3.53 KB

text-notes.md

File metadata and controls

90 lines (53 loc) · 3.53 KB

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 2. 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:

  • 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.

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:

  • Bold: Type **text** or __text__
  • Italic: Type *text* or _text_
  • Code: Type `text`
  • Strikethrough: Type ~~text~~

Lists

  • Bulleted list: Start a line with * or - followed by a space
  • Numbered list: Start a line with 1. or 1) followed by a space
  • To-do list: Start a line with [ ] for an unchecked item or [x] for a checked item

Blocks

  • Block quote: Start a line with > followed by a space

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.