Working with Mermaid Diagrams
Panduan lengkap untuk bekerja dengan Mermaid diagrams di dokumentasi ini.π― Quick Actions
1. Zoom In/Out
- Browser Zoom:
Cmd/Ctrl + ScrollatauCmd/Ctrl + Plus/Minus - Open in New Tab: Klik kanan pada diagram β βOpen Image in New Tabβ
- Fullscreen: Tekan
F11untuk fullscreen mode
2. Download Diagram
Method A: Via Mermaid Live Editor (Recommended)
- Copy code Mermaid dari dokumentasi
- Buka Mermaid Live Editor
- Paste code di editor
- Klik Actions β Download:
- PNG (untuk presentasi)
- SVG (untuk editing lebih lanjut)
- PDF (untuk dokumentasi)
Method B: Via Browser DevTools
- Klik kanan pada diagram β Inspect Element
- Find
<svg>element - Klik kanan pada
<svg>β Copy β Copy outerHTML - Paste ke text editor dan save sebagai
.svg - Buka di browser atau convert ke PNG menggunakan tool online
Method C: Via Screenshot
- macOS:
Cmd + Shift + 4β select area - Windows:
Win + Shift + Sβ select area - Linux:
PrtScnatau screenshot tool
3. Edit Diagram
- Copy code Mermaid
- Buka Mermaid Live Editor
- Edit sesuai kebutuhan
- Download hasil edit
π§ Mermaid Live Editor Features
Mermaid Live Editor menyediakan:- β Live Preview - Real-time rendering
- β Export Options - PNG, SVG, PDF
- β Theme Selection - Light/Dark/Custom themes
- β Share Link - Generate shareable link
- β Configuration - Customize diagram appearance
π Example Workflow
Scenario: Download ERD Diagram
-
Buka halaman dengan ERD diagram (contoh:
/40-database/erd-diagram) - Copy Mermaid code:
-
Paste ke Mermaid Live:
- Buka https://mermaid.live
- Paste code
- Diagram akan ter-render otomatis
-
Customize (optional):
- Pilih theme (default, dark, forest, etc.)
- Adjust configuration
-
Download:
- Klik Actions β Download SVG atau Download PNG
- Save ke local machine
π¨ Advanced: Custom Styling
Anda bisa customize appearance diagram dengan Mermaid configuration:π Useful Links
Mermaid Live Editor
Online editor untuk edit dan download diagrams
Mermaid Documentation
Official documentation dan syntax reference
Mermaid Cheat Sheet
Quick reference untuk syntax
SVG to PNG Converter
Convert SVG ke PNG online
π‘ Pro Tips
π Quick Reference
| Action | Shortcut/Method |
|---|---|
| Zoom In | Cmd/Ctrl + Plus |
| Zoom Out | Cmd/Ctrl + Minus |
| Reset Zoom | Cmd/Ctrl + 0 |
| Fullscreen | F11 |
| Screenshot (macOS) | Cmd + Shift + 4 |
| Screenshot (Windows) | Win + Shift + S |
| Open in New Tab | Right-click β βOpen Image in New Tabβ |
| Copy SVG | DevTools β Copy outerHTML |
π Need Help?
Jika Anda mengalami kesulitan dengan Mermaid diagrams:- Check Mermaid Documentation
- Try Mermaid Live Editor untuk troubleshooting
- Contact team untuk assistance