中文
GitHub
Docs
Deployment
User Guide
Example
中文
GitHub
Docs
Example
Guest
Sign in
MrDoc Document Example
Markdown document example
Quote text
Audio and video
Attachment preview
Link effects
Images and attachments
Documentation table of contents
Code block effects
Table effects
List effects
Symbols and emoji
Scientific formulas
Flowchart
Sequence diagram
Strikethrough, bold, italic, superscript and subscript
Markdown text highlighting
Mind map, mind map, mindmap.
ECharts graphs and charts
Timeline
50,000-word ultra-long document
Mermaid diagrams
Markdown test document
Rich text document example
Documentation table of contents
Online spreadsheet document example
This is an online spreadsheet
Online spreadsheet with local Excel import
Mind map document
Hand-drawn diagram documentation
Office documents
OnlyOffice online documents
OnlyOffice online spreadsheet
OnlyOffice Slides
Powered by MrDoc Pro
-
+
home
Mermaid diagrams
# mermaid Diagrams MrDoc supports inserting mermaid diagrams in the Markdown editor. Hover the mouse over the mermaid icon (mermaid) in the editor toolbar to insert examples of different types of mermaid diagrams. For more information on mermaid diagram syntax, refer to https://mermaid.nodejs.cn/intro/ . ## Syntax ```mermaid {mermaid diagram syntax} ``` ## Examples ### Flowchart ```mermaid graph TD Start --> Stop ``` ```mermaid graph TD Start --> Stop ``` ### Sequence Diagram ```mermaid sequenceDiagram Alice->>John: Hello John, how are you? John-->>Alice: Great! Alice-)John: See you later! ``` ```mermaid sequenceDiagram Alice->>John: Hello John, how are you? John-->>Alice: Great! Alice-)John: See you later! ``` ### Class Diagram ```mermaid classDiagram Animal <|-- Duck Animal <|-- Fish Animal <|-- Zebra Animal : +int age Animal : +String gender Animal: +isMammal() Animal: +mate() class Duck{ +String beakColor +swim() +quack() } class Fish{ -int sizeInFeet -canEat() } class Zebra{ +bool is_wild +run() } ``` ```mermaid classDiagram Animal <|-- Duck Animal <|-- Fish Animal <|-- Zebra Animal : +int age Animal : +String gender Animal: +isMammal() Animal: +mate() class Duck{ +String beakColor +swim() +quack() } class Fish{ -int sizeInFeet -canEat() } class Zebra{ +bool is_wild +run() } ``` ### State Diagram ```mermaid stateDiagram-v2 [*] --> Still Still --> [*] Still --> Moving Moving --> Still Moving --> Crash Crash --> [*] ``` ```mermaid stateDiagram-v2 [*] --> Still Still --> [*] Still --> Moving Moving --> Still Moving --> Crash Crash --> [*] ``` ### Entity Relationship Diagram ```mermaid erDiagram CUSTOMER ||--o{ ORDER : places ORDER ||--|{ LINE-ITEM : contains CUSTOMER }|..|{ DELIVERY-ADDRESS : uses ``` ```mermaid erDiagram CUSTOMER ||--o{ ORDER : places ORDER ||--|{ LINE-ITEM : contains CUSTOMER }|..|{ DELIVERY-ADDRESS : uses ``` ### Journey Diagram ```mermaid journey title My working day section Go to work Make tea: 5: Me Go upstairs: 3: Me Do work: 1: Me, Cat section Go home Go downstairs: 5: Me Sit down: 5: Me ``` ```mermaid journey title My working day section Go to work Make tea: 5: Me Go upstairs: 3: Me Do work: 1: Me, Cat section Go home Go downstairs: 5: Me Sit down: 5: Me ``` ### Gantt Chart ```mermaid gantt title A Gantt Diagram dateFormat YYYY-MM-DD section Section A task :a1, 2014-01-01, 30d Another task :after a1 , 20d section Another Task in sec :2014-01-12 , 12d another task : 24d ``` ```mermaid gantt title A Gantt Diagram dateFormat YYYY-MM-DD section Section A task :a1, 2014-01-01, 30d Another task :after a1 , 20d section Another Task in sec :2014-01-12 , 12d another task : 24d ``` ### Pie Chart ```mermaid pie title Pets adopted by volunteers "Dogs" : 386 "Cats" : 85 "Rats" : 15 ``` ```mermaid pie title Pets adopted by volunteers "Dogs" : 386 "Cats" : 85 "Rats" : 15 ``` ### Timeline ```mermaid timeline title History of Social Media Platform 2002 : LinkedIn 2004 : Facebook : Google 2005 : Youtube 2006 : Twitter ``` ```mermaid timeline title History of Social Media Platform 2002 : LinkedIn 2004 : Facebook : Google 2005 : Youtube 2006 : Twitter ```
mrdoc
Sept. 29, 2026, 6:37 p.m.
Forward
Favorites
Last
Next
Scan the QR Code
Copy link
Scan the QR code to share.
Copy link
share
link
type
password
Update password
Validity period
Markdown file
Word document
PDF document (print)