Formatting posts with the Slack api

后端 未结 1 1374
一向
一向 2021-01-07 05:16

I\'m trying to create Posts with botkit using the Slack api, but I can\'t find any documentation on how to format a Post file in Slack.

<         


        
相关标签:
1条回答
  • 2021-01-07 05:38

    Posts support markdown formatting.

    E.g., try setting the following content:

    # A Post Header
    
    ### Subheading
    
    An image? ![Funny](https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ4jlx3aktZVFKAkaNB7fvy67BFQuaO3HedVQ6VIXeR5OLnfbOOEbrcp-G4)
    
    [A link to google](https://www.google.com)
    
    * A list item
    * Another list item
    
    `a code block`
    

    You then post with filetype="post", and get the following:

    I tested and slack appears to support most markdown features but not all. Make sure to test your formatting!

    0 讨论(0)
提交回复
热议问题