Markdown 指南

PlainApp 笔记中的 Markdown 语法速查——标题、列表、表格、代码块等。

标题

在行首添加 #,# 的数量表示级别,从 1(最大)到 6(最小)。标题前后请保留空行。

Markdown
# Heading level 1
## Heading level 2
### Heading level 3
#### Heading level 4
##### Heading level 5
###### Heading level 6
效果

Heading level 1

Heading level 2

Heading level 3

Heading level 4

Heading level 5
Heading level 6

提示: PlainApp 编辑器工具栏的「标题」按钮可以自动插入这些格式。

段落与换行

段落之间用空行分隔。如需在段落内换行,请在行尾添加反斜杠。

Markdown
First paragraph.

Second paragraph.
效果

First paragraph.

Second paragraph.

Markdown
Line one\
Line two
效果

Line one
Line two

粗体与斜体

用双星号包裹文字表示粗体,单星号表示斜体,两个波浪号渲染删除线。

Markdown
**bold text**
效果

bold text

Markdown
*italic text*
效果

italic text

Markdown
~~struck through~~
效果

struck through

Markdown
**bold and *nested italic***
效果

bold and nested italic

列表

行首用 - 表示无序列表,1. 表示有序列表。缩进空格可嵌套列表项。用 - [ ] 表示待办项,完成后改为 - [x]。

Markdown
- One
- Two
- Three
效果
  • One
  • Two
  • Three
Markdown
1. First
2. Second
3. Third
效果
  1. First
  2. Second
  3. Third
Markdown
- [ ] Buy milk
- [x] Write the note
效果
  • Buy milk
  • Write the note
Markdown
- Fruit
  - Apple
  - Banana
- Vegetable
效果
  • Fruit
    • Apple
    • Banana
  • Vegetable

引用与标注

行首用 > 表示引用。在 PlainApp 中,> [!note] 会把该块渲染为标注框。

Markdown
> This is a blockquote.
效果

This is a blockquote.

Markdown
> [!note] Heads up
> This renders as a callout box in PlainApp.
效果

[!note] Heads up This renders as a callout box in PlainApp.

代码

行内代码用单个反引号包裹。代码块用三个反引号,并在其后加上语言名以获得语法高亮。

Markdown
Use `inline code` for short snippets.
效果

Use inline code for short snippets.

Markdown
```js
console.log("hello");
```
效果
console.log("hello");

提示: 编辑器工具栏的「代码」按钮可以插入行内代码和代码块。

图片

与链接写法相同,只需在前面加感叹号:![替代文字](图片 URL)。

Markdown
![PlainApp logo](/plainapp.svg)
效果

PlainApp logo

表格

用竖线

Markdown
| Left | Center | Right |
|:-----|:------:|------:|
| a    | b      | c     |
| d    | e      | f     |
效果
Left Center Right
a b c
d e f

提示: 编辑器工具栏的「表格」按钮可以插入空表格骨架。

分隔线

单独一行上的三个或更多短横线、星号或下划线会渲染为分隔线。上方请留空行,否则上一行会变成标题。

Markdown
First section.

---

Second section.
效果

First section.


Second section.

转义字符

在 Markdown 会格式化的字符(如 * _ # 或反引号)前加反斜杠,即可原样显示。

Markdown
\*not italic\*
效果

*not italic*

Markdown
\# not a heading
效果

# not a heading

内联 HTML

PlainApp 笔记还支持少量 HTML 标签:下划线、高亮、彩色文字以及可折叠的 details。

Markdown
<u>underlined text</u>
效果

underlined text

Markdown
<mark>highlighted text</mark>
效果

highlighted text

Markdown
<font color="#8b5cf6">colored text</font>
效果

colored text

Markdown
<details>
<summary>Click to expand</summary>
Hidden content here.
</details>
效果
Click to expand Hidden content here.

数学公式与更多

上标 x^2^、下标 H~2~O、行内公式 $E = mc^2$、用 $$ 包裹的公式块、脚注 [^1],以及渲染后隐藏的 %% 注释 %%。

Markdown
x^2^ + y^3^
效果

x^2^ + y^3^

Markdown
H~2~O
效果

H2O

Markdown
Inline math $E = mc^2$ and a block:
$$
a^2 + b^2 = c^2
$$
效果

Inline math $E = mc^2$ and a block: $$ a^2 + b^2 = c^2 $$

Markdown
See the footnote[^1] for details.

[^1]: This is the footnote text.
效果

See the footnote[^1] for details.

[^1]: This is the footnote text.

Markdown
%% This comment stays hidden in PlainApp %%
效果

%% This comment stays hidden in PlainApp %%

提示: PlainApp 笔记中数学公式、脚注和标注会渲染为富文本块;此处「效果」列展示的是普通网页输出。