# 引用标注

**URL:** https://meta.discourse.org/t/quote-callouts/350962
**Category:** Theme component
**Created:** [2025年二月6日 22:12 UTC](https://meta.discourse.org/t/quote-callouts/350962 "2025-02-06T22:12:22Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [2025年二月6日 22:12 UTC](https://meta.discourse.org/t/quote-callouts/350962/1 "2025-02-06T22:12:22Z")

</div>

| | | |
| --- | --- | --- |
| ℹ | **摘要** | 添加 Obsidian 风格的提示框（Callouts），作为 Markdown 引用的一种替代方案。 |
| 👓 | **预览** | [Theme Creator](https://discourse.theme-creator.io/theme/Arkshine/quote-callouts) |
| 🛠 | **仓库** | [GitHub - Arkshine/discourse-quote-callouts · GitHub](https://github.com/Arkshine/discourse-quote-callouts) |
| ❓ | **安装指南** | [如何安装主题或主题组件](https://meta.discourse.org/t/how-do-i-install-a-theme-or-theme-component/63682) |
| 📖 | **Discourse 主题新手？** | [Discourse 主题使用入门指南](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) |

安装此主题组件

此主题组件在 Discourse 中支持 [Obsidian 风格的提示框](https://help.obsidian.md/Editing+and+formatting/Callouts)，作为 Markdown 引语的替代方案。

提示框是突出显示内容、添加备注、警告或其他特殊消息的绝佳方式。

 ![图片展示了不同类型的注释工具提示框，包括备注、自定义标题、可折叠警告和仅标题备注。（AI 标注）](https://global.discourse-cdn.com/meta/original/4X/5/4/1/541d15a4117ab4e333f15ef8e8e2c372fdaec196.png)  
 ![图片显示一条聊天消息通知，内容为“聊天中也能正常工作。”（AI 标注）](https://global.discourse-cdn.com/meta/original/4X/8/5/7/8574a2ee238e7b18c393bf2ac1dea212bcdcd8f8.png)

## 使用方法

创建提示框有多种方式。

### Markdown 语法

在引用的第一行添加 `[!type]`，其中 `type` 是类型标识符。类型标识符决定了提示框的外观和风格。查看所有可用类型，请参阅“支持的类型”部分。

> ℹ 类型标识符不区分大小写。

```markdown
> [!tip] 
> **提示** ：使用 `代码片段` 可提高可读性。它们提供清晰度和精确度。

```

 ![image](https://global.discourse-cdn.com/meta/original/4X/3/6/7/3675dbcf45e48b1e88f47fe6d8f251efc48913ba.png)

#### 预览

```
您可以通过点击图标来更改类型：

![chrome_atmmLf0v3c|690x209](upload://hZYzuK1MCwo7vsMEV9uYEZZOqjn.jpeg) 

```

### 富文本编辑器

现已完全支持，请参阅“富文本编辑器支持”部分。

### 键盘快捷键

- Ctrl + q — 插入空提示框

### 工具栏

 ![chrome_7HSSbReBtO](https://global.discourse-cdn.com/meta/original/4X/e/7/b/e7bd86d2cfc1e5fbea1376031d4249a288df9c69.jpeg)  
 ![chrome_YaDrphqvbV](https://global.discourse-cdn.com/meta/original/4X/6/3/5/635bea715f9ffc5018b8738de16c986233516786.jpeg)

#### 聊天

工具栏中提供了一个按钮，用于插入默认提示框。

 ![chrome_CWig42tWHY](https://global.discourse-cdn.com/meta/original/4X/7/6/d/76d5674fbc2dc07188bc4b24d483a5e85adaf63e.jpeg)  
 ![chrome_TsyfsoA82R](https://global.discourse-cdn.com/meta/original/4X/2/2/8/22847a19f440484f63e94f192f732dbaffdb9b66.jpeg)  
 ![chrome_nWk7hUyRGr](https://global.discourse-cdn.com/meta/original/4X/c/3/d/c3dee18db204017fe15879927b4baebc0223b06b.jpeg)

### 自定义标题

默认情况下，提示框的标题是其类型标识符（首字母大写）。您可以在类型标识符后添加文本来更改它：

```markdown
> [!question] 自定义标签 🤗
> 提示框的标签可以自定义。

> [!abstract] [date=2032-12-22 timezone="Europe/Paris"]
> 它们还可以包含特殊的内联格式，如动态日期。

```

 ![图片展示了自定义标签和动态日期内联格式的例子。（AI 标注）](https://global.discourse-cdn.com/meta/original/4X/8/4/b/84b2fca7273699fba7cfba275dac02084e5fc740.png)

您还可以创建仅标题的提示框：

```markdown
> [!success] 已解决。

```

![chrome_z53bS1GCew](https://cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/meta/original/4X/7/d/4/7d4748a50a4bb19e2ee9a332a82885afd8b903cf.png)

### 可折叠提示框

您可以通过在类型标识符后直接添加加号 `+` 或减号 `-` 来使提示框可折叠。

- `+` 默认展开提示框
- `-` 默认折叠提示框

```markdown
> [!todo]- 我的待办事项列表
>
> - [x] 编写文档
> - [] 添加测试
> - [] 审查代码

> [!todo]+ 我的展开待办事项列表
>
> - [x] 创建仓库
> - [] 设置 CI/CD
> - [] 部署到生产环境

```

![图片显示了一个展开的待办事项列表，包含“创建仓库”、“设置 CI/CD

---

_[View the full topic](https://meta.discourse.org/t/quote-callouts/350962)._
