# 绘图

你可以直接通过 GitBook 使用集成的 [Excalidraw](https://excalidraw.com/) 编辑器创建绘图或草图，然后将其直接添加到你的 GitBook 页面中。

要创建绘图，请按 `/` 在空白行上调出插入面板，然后选择 **绘图**。这将打开一个带有 Excalidraw 工具的弹出窗口——完成后只需关闭弹窗，你的图表就会显示在 GitBook 页面上。

GitBook 会将绘图作为空间中的特殊 SVG 文件存储。这些文件的扩展名为 `drawing.svg`.

### 绘图块示例

<img src="/files/9afcfbc2f1156d3cc1866c1cca3513cd5bd66b4f" alt="在 GitBook 中绘制的图表" class="gitbook-drawing">

### 使用 GitBook AI 绘图

使用绘图块时，你可以通过指定提示词让 GitBook AI 生成插图。只需输入提示词并按 **生成**，或者选择一个建议的提示词开始。

当 GitBook AI 完成绘图后，你可以双击打开完整的绘图面板，并按你的需要进行编辑。

编辑绘图时，点击 **使用 AI 生成** 按钮可再次调出 GitBook AI 的提示词编辑器，并生成新的绘图。

### Markdown 中的表示

```markdown
<img src="https://example.com/file.svg" alt="示例图表描述" class="gitbook-drawing">
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gitbook.com/docs/documentation/zh/creating-content/blocks/drawing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
