https://github.com/mermaid-js/mermaid-live-editor
Edit, preview and share mermaid charts/diagrams. New implementation of the live editor.
https://github.com/mermaid-js/mermaid-live-editor
diagrams mermaid
Last synced: 6 days ago
JSON representation
Edit, preview and share mermaid charts/diagrams. New implementation of the live editor.
- Host: GitHub
- URL: https://github.com/mermaid-js/mermaid-live-editor
- Owner: mermaid-js
- License: mit
- Created: 2019-11-21T20:31:36.000Z (over 5 years ago)
- Default Branch: develop
- Last Pushed: 2025-04-02T06:31:14.000Z (13 days ago)
- Last Synced: 2025-04-02T08:39:07.109Z (13 days ago)
- Topics: diagrams, mermaid
- Language: TypeScript
- Homepage: https://mermaid.live
- Size: 136 MB
- Stars: 4,775
- Watchers: 42
- Forks: 745
- Open Issues: 77
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
- awesome-sveltekit - [code
- jimsghstars - mermaid-js/mermaid-live-editor - Edit, preview and share mermaid charts/diagrams. New implementation of the live editor. (TypeScript)
README
[](https://discord.gg/sKeNQX4Wtj)
[](https://app.netlify.com/sites/mermaidjs/deploys)# Mermaid Live Editor
Edit, preview and share mermaid charts/diagrams.
## Features
- Edit and preview flowcharts, sequence diagrams, gantt diagrams in real time.
- Save the result as a svg
- Get a link to a viewer of the diagram so that you can share it with others.
- Get a link to edit the diagram so that someone else can tweak it and send a new link back## Live demo
You can try out a live version [here](https://mermaid.live/).
# Contributors are welcome!
If you want to speed up the progress for mermaid-live-editor, join the Discord channel and contact knsv.
## Docker
### Run published image
```bash
docker run --platform linux/amd64 --publish 8000:8080 ghcr.io/mermaid-js/mermaid-live-editor
```### To configure renderer URL
When building set the MERMAID_RENDERER_URL build argument to the rendering
service.
Example:
Default is`https://mermaid.ink`.
Set to empty string to disable PNG and SVG links under Actions### To configure Kroki Instance URL
When building set the MERMAID_KROKI_RENDERER_URL build argument to your Kroki
instance.
Default is `https://kroki.io`
Set to empty string to disable Kroki link under Actions### To configure Analytics
When building set the MERMAID_ANALYTICS_URL build argument to your plausible instance, and MERMAID_DOMAIN to your domain.
Default is empty, disabling analytics.
### To enable Mermaid Chart links and promotion
When building set the MERMAID_IS_ENABLED_MERMAID_CHART_LINKS build argument to `true`
Default is empty, disabling button to save to Mermaid Chart and promotional banner.
### To update the Security modal
The modal shown on clicking the security link assumes analytics, renderer, Kroki
and Mermaid chart are enabled. You can update it by modifying `Privacy.svelte`
if you wish.### Development
```bash
docker compose up --build
```Then open http://localhost:3000
### Building and running images locally
#### Build
```bash
docker build -t mermaid-js/mermaid-live-editor .
```#### Run
```bash
docker run --detach --name mermaid-live-editor --publish 8080:8080 mermaid-js/mermaid-live-editor
```Visit:
#### Stop
```bash
docker stop mermaid-live-editor
```## Setup
Below link will help you making a copy of the repository in your local system.
https://docs.github.com/en/get-started/quickstart/fork-a-repo
## Requirements
- [Node.js](https://nodejs.org/en/) current LTS version
- [pnpm](https://pnpm.io/) package manager. Install with `corepack enable pnpm`## Development
```sh
pnpm install
pnpm dev -- --open
```This app is created with Svelte Kit.
## Release
When a PR is created targeting master, it will be built and deployed by Netlify.
The URL will be indicated in a Comment in the PR.Once the PR is merged, it will automatically be released.