项目作者: mermaid-js

项目描述 :
Edit, preview and share mermaid charts/diagrams. New implementation of the live editor.
高级语言: TypeScript
项目地址: git://github.com/mermaid-js/mermaid-live-editor.git
创建时间: 2019-11-21T20:31:36Z
项目社区:https://github.com/mermaid-js/mermaid-live-editor

开源协议:MIT License

下载


Join our Discord!
Netlify Status

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.

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

  1. 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 ishttps://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.

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

  1. docker compose up --build

Then open http://localhost:3000

Building and running images locally

Build

  1. docker build -t mermaid-js/mermaid-live-editor .

Run

  1. docker run --detach --name mermaid-live-editor --publish 8080:8080 mermaid-js/mermaid-live-editor

Visit: http://localhost:8080

Stop

  1. 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 current LTS version
  • pnpm package manager. Install with corepack enable pnpm

Development

  1. pnpm install
  2. 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.