Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

钉钉支持markdown渲染,回复消息的Msgtype可以用markdown。 #78

Closed
zanderzhng opened this issue Mar 7, 2023 · 6 comments · Fixed by #115
Closed

钉钉支持markdown渲染,回复消息的Msgtype可以用markdown。 #78

zanderzhng opened this issue Mar 7, 2023 · 6 comments · Fixed by #115
Labels
question Further information is requested

Comments

@zanderzhng
Copy link

问题反馈

  • 搜索打开和关闭的 GitHub 问题,请勿重复提交issue。

重要:提交问题时,请务必带上输出日志,以及个人排查的成果。

Msgtype 用 markdown 而不是用 text。

{
     "msgtype": "markdown",
     "markdown": {
         "title":"杭州天气",
         "text": "#### 杭州天气 @150XXXXXXXX \n > 9度,西北风1级,空气良89,相对温度73%\n > ![screenshot](https://img.alicdn.com/tfs/TB1NwmBEL9TBuNjy1zbXXXpepXa-2400-1218.png)\n > ###### 10点20分发布 [天气](https://www.dingtalk.com) \n"
     },
      "at": {
          "atMobiles": [
              "150XXXXXXXX"
          ],
          "atUserIds": [
              "user123"
          ],
          "isAtAll": false
      }
 }
@zanderzhng zanderzhng added the question Further information is requested label Mar 7, 2023
@eryajf
Copy link
Owner

eryajf commented Mar 7, 2023

了解,只是目前还没想到有哪些需要markdown的地方,可能如果内容有代码啥的,可以基于Markdown进行渲染

@zanderzhng
Copy link
Author

主要就是代码,图片,还有有时候它可以生成一些表格,这些钉钉都支持渲染。

@or2me
Copy link

or2me commented Mar 10, 2023

别瞎说兄弟 钉钉的机器人api 只支持很少的markdown语法 其中最重要的就是不支持代码

@or2me
Copy link

or2me commented Mar 10, 2023

标题

一级标题

二级标题

三级标题

四级标题

五级标题
六级标题

引用

A man who stands for nothing will fall for anything.

文字加粗、斜体
bold
italic

链接
this is a link

图片

无序列表

  • item1
  • item2

有序列表

  1. item1
  2. item2

只支持这些 具体见https://open.dingtalk.com/document/orgapp/enterprise-internal-robots-send-markdown-messages#title-w87-omz-3es

@zanderzhng
Copy link
Author

zanderzhng commented Mar 10, 2023

别瞎说兄弟 钉钉的机器人api 只支持很少的markdown语法 其中最重要的就是不支持代码

确实是不支持代码,没看他的文档,没想到不支持这个。
表格是支持的,我有机器人在用他发一些定时数据。

image

@eryajf
Copy link
Owner

eryajf commented Mar 23, 2023

现已支持这个功能,也支持了生成图片的功能,快快升级到最新版体验吧

This was referenced Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants