# 在帖子中添加图表？

**URL:** https://meta.discourse.org/t/add-diagrams-to-posts/191283
**Category:** Feature
**Created:** [2021年五月22日 16:29 UTC](https://meta.discourse.org/t/add-diagrams-to-posts/191283 "2021-05-22T16:29:59Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [2021年七月22日 21:51 UTC](https://meta.discourse.org/t/add-diagrams-to-posts/191283/5 "2021-07-22T21:51:26Z")

</div>

@Bank_Live，我认为目前并没有像您示例中那样与 [draw.io](http://draw.io) 图表的真正集成。

提到的 Graphviz 插件对于可以用文本形式简单表达的小型图表可能还行。但许多 Diagrams/draw.io 项目要复杂得多。

多年前在以下地址曾有过关于某种方法的讨论：

> [@Embed draw.io diagram in post](https://meta.discourse.org/t/embed-draw-io-diagram-in-post/14369):
>
> I like using [draw.io](http://www.draw.io/) for diagramming. It would be nice to aid discussions with diagrams from there using the latest version of the diagram. [Draw.io](http://Draw.io) allows you to embed an editable drawing as an HTML/Javascript snippet, but this doesn’t currently work in a Discourse post. Would creating a onebox file for [draw.io](http://draw.io) be the right approach? Or is this a new feature?

随后还有一篇关于使用类似工具 Gliffy 的相关讨论：

> [@Images from Gliffy embed not rendering](https://meta.discourse.org/t/images-from-gliffy-embed-not-rendering/82392):
>
> Are there any specific reasons why an image wouldn’t be rendered within a post? Blocking headers… something? I’m trying to embed an image from Gliffy diagramming service. When the digram is updated through Gliffy I want the image updated automatically on the forum. They have an image sharing service for exactly this purpose. It generates the following URL for my test image: [image] Note, it doesn’t render as an image in Discourse. But it does allow you to: link to the ima…

当时（在上述主题中）@mpalmer 曾有兴趣构建与 [Draw.io](http://Draw.io) 的链接，但似乎并未付诸实施。今天我收到了关于此问题的请求，因此我将进一步研究有哪些可行方案。也许可以从 [Draw.io](http://Draw.io) 界面嵌入一个 IFRAME，并在您的 Discourse 帖子中使用其生成的 HTML。

---

_[View the full topic](https://meta.discourse.org/t/add-diagrams-to-posts/191283)._
