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

Commit 79c82b1

Browse files
committed
feat(docs): document admonitions
1 parent ba96806 commit 79c82b1

File tree

9 files changed

+261
-16
lines changed

9 files changed

+261
-16
lines changed

docs/User Guide/!!!meta.json

Lines changed: 52 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2798,6 +2798,51 @@
27982798
],
27992799
"dirFileName": "Text",
28002800
"children": [
2801+
{
2802+
"isClone": false,
2803+
"noteId": "NwBbFdNZ9h7O",
2804+
"notePath": [
2805+
"pOsGYCXsbNQG",
2806+
"KSZ04uQ2D1St",
2807+
"iPIMuisry3hd",
2808+
"NwBbFdNZ9h7O"
2809+
],
2810+
"title": "Admonitions",
2811+
"notePosition": 10,
2812+
"prefix": null,
2813+
"isExpanded": false,
2814+
"type": "text",
2815+
"mime": "text/html",
2816+
"attributes": [
2817+
{
2818+
"type": "label",
2819+
"name": "iconClass",
2820+
"value": "bx bx-info-circle",
2821+
"isInheritable": false,
2822+
"position": 10
2823+
}
2824+
],
2825+
"format": "markdown",
2826+
"dataFileName": "Admonitions.md",
2827+
"attachments": [
2828+
{
2829+
"attachmentId": "do36b54XpmIC",
2830+
"title": "image.png",
2831+
"role": "image",
2832+
"mime": "image/png",
2833+
"position": 10,
2834+
"dataFileName": "Admonitions_image.png"
2835+
},
2836+
{
2837+
"attachmentId": "hUwfwkRSDeLJ",
2838+
"title": "image.png",
2839+
"role": "image",
2840+
"mime": "image/png",
2841+
"position": 10,
2842+
"dataFileName": "1_Admonitions_image.png"
2843+
}
2844+
]
2845+
},
28012846
{
28022847
"isClone": false,
28032848
"noteId": "QxEyIjRBizuC",
@@ -2808,7 +2853,7 @@
28082853
"QxEyIjRBizuC"
28092854
],
28102855
"title": "Code blocks",
2811-
"notePosition": 10,
2856+
"notePosition": 20,
28122857
"prefix": null,
28132858
"isExpanded": false,
28142859
"type": "text",
@@ -2889,7 +2934,7 @@
28892934
"veGu4faJErEM"
28902935
],
28912936
"title": "Content language & Right-to-left support",
2892-
"notePosition": 20,
2937+
"notePosition": 30,
28932938
"prefix": null,
28942939
"isExpanded": false,
28952940
"type": "text",
@@ -2926,7 +2971,7 @@
29262971
"UYuUB1ZekNQU"
29272972
],
29282973
"title": "Formatting",
2929-
"notePosition": 30,
2974+
"notePosition": 40,
29302975
"prefix": null,
29312976
"isExpanded": false,
29322977
"type": "text",
@@ -2979,7 +3024,7 @@
29793024
"nRhnJkTT8cPs"
29803025
],
29813026
"title": "Formatting toolbar",
2982-
"notePosition": 40,
3027+
"notePosition": 50,
29833028
"prefix": null,
29843029
"isExpanded": false,
29853030
"type": "text",
@@ -3054,7 +3099,7 @@
30543099
"mT0HEkOsz6i1"
30553100
],
30563101
"title": "Images",
3057-
"notePosition": 50,
3102+
"notePosition": 60,
30583103
"prefix": null,
30593104
"isExpanded": false,
30603105
"type": "text",
@@ -3192,7 +3237,7 @@
31923237
"QEAPj01N5f7w"
31933238
],
31943239
"title": "Links",
3195-
"notePosition": 60,
3240+
"notePosition": 70,
31963241
"prefix": null,
31973242
"isExpanded": false,
31983243
"type": "text",
@@ -3248,7 +3293,7 @@
32483293
"S6Xx8QIWTV66"
32493294
],
32503295
"title": "Lists",
3251-
"notePosition": 70,
3296+
"notePosition": 80,
32523297
"prefix": null,
32533298
"isExpanded": false,
32543299
"type": "text",
26.7 KB
Loading
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Admonitions
2+
![](1_Admonitions_image.png)
3+
4+
Admonitions are a way to highlight information to the reader. Other names for it include _call-outs_ and _info/warning/alert boxes_.
5+
6+
## Inserting a new admonition
7+
8+
### From the UI
9+
10+
In the Formatting toolbar:
11+
12+
![](Admonitions_image.png)
13+
14+
### Via the keyboard
15+
16+
It's possible to insert an admonition simply by typing:
17+
18+
* `!!! note`
19+
* `!!! tip`
20+
* `!!! important`
21+
* `!!! caution`
22+
* `!!! warning`
23+
24+
In addition to that, it's also possible to type `!!!`  followed by any text, case in which a default admonition type will appear (note) with the entered text inside it.
25+
26+
## Interaction
27+
28+
By design, admonitions act very similar to block quotes.
29+
30+
* Selecting a text and pressing the admonition button will turn that text into an admonition.
31+
* If selecting multiple admonitions, pressing the admonition button will automatically merge them into one.
32+
33+
Inside an admonition:
34+
35+
* Pressing <kbd>Backspace</kbd> while the admonition is empty will remove it.
36+
* Pressing <kbd>Enter</kbd> will start a new paragraph. Pressing it twice will exit out of the admonition.
37+
* Headings and other block content including tables can be inserted inside the admonition.
38+
39+
## Types of admonitions
40+
41+
There are currently five types of admonitions: _Note_, _Tip_, _Important_, _Caution_, _Warning_.
42+
43+
These types were inspired by GitHub's support for this feature and there are currently no plans for adjusting it or allowing the user to customize them.
44+
45+
## Markdown support
46+
47+
The Markdown syntax for admonitions as supported by Trilium is the one that GitHub uses, which is as follows:
48+
49+
```markdown
50+
> [!NOTE]
51+
> This is a note.
52+
53+
> [!TIP]
54+
> This is a tip.
55+
56+
> [!IMPORTANT]
57+
> This is a very important information.
58+
59+
> [!CAUTION]
60+
> This is a caution.
61+
```
62+
63+
There are currently no plans of supporting alternative admonition syntaxes such as `!!! note`.
7.03 KB
Loading

src/public/app/doc_notes/en/User Guide/!!!meta.json

Lines changed: 54 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
26.7 KB
Loading

0 commit comments

Comments
 (0)