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 筆記中數學公式、腳註與標註會渲染為豐富區塊;此處「效果」欄顯示的是一般網頁輸出。