> For the complete documentation index, see [llms.txt](https://gitbook.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.com/docs/documentation/zh/chuang-jian-nei-rong/blocks/drawing.md).

# 绘图

你可以通过 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://gitbook.com/docs/documentation/zh/chuang-jian-nei-rong/blocks/drawing.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
