Giter VIP home page Giter VIP logo

mermaid-preview's Introduction

This is an app for Slack that renders Mermaid diagrams in Slack.

This app adds a /mermaid command to your Slack workspace. You can use it to post Mermaid diagrams in Slack messages.

Add to Slack

Mermaid Preview screenshot

How it works

The app listens for a /mermaid command and opens a Slack modal where you can enter your Mermaid diagram code. After you submit the modal, the app renders the diagram using Mermaid CLI into a PNG file. This PNG is uploaded to Slack and posted as a message. PNG is deleted from the server after it's posted.

Wishlist

  • Edit already posted diagram (through Modal?)
  • Automatically detect Mermaid diagrams in messages and render them?
  • Live preview of the mermaid document in the modal? Seems like this can't be done with Slack's UI limitations.
  • Support DMs, more context in the comment.

mermaid-preview's People

Contributors

jackub avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mermaid-preview's Issues

mermaid-preview says flowchart diagram is invalid

I've just tried mermaid-preview for the first time. It doesn't seem to support the flowchart diagram. I've used the following sample diagram from Mermaid.live:

flowchart TD
    A[Christmas] -->|Get money| B(Go shopping)
    B --> C{Let me think}
    C -->|One| D[Laptop]
    C -->|Two| E[iPhone]
    C -->|Three| F[fa:fa-car Car]

I get a message back that says "Mermaid diagram is invalid."

Support /mermaid in threads

I tried to use /mermaid in a thread today but Slackbot let me know that it doesn't work in threads. Is this easy to implement?

How do you use it in a private channel?

I tried using /mermaid in a private channel, but it shows Mermaid Preview can't automatically join private channels. If it's a private channel, please invite Mermaid bot to it.. I tried adding the Mermaid bot to the channel; however, it doesn't show up on the participants list.

How do I use it in a private channel?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.