A lightweight, powerful, browser-based Markdown editor. It features real-time preview, LaTeX mathematical formulas, Mermaid diagrams, and code syntax highlighting. Designed specifically for creative writing, academic note-taking, and developer documentation.
- Live Preview: Edit on the left, see the rendered HTML instantly on the right.
- History Management: Full Undo and Redo functionality (Ctrl+Z / Ctrl+Y).
- Search & Replace: Built-in search bar supporting keyword lookup and batch replacement.
- Smart Word Count: Precise word counting with support for mixed CJK (Chinese, Japanese, Korean) and Western typography.
-
Syntax Highlighting: Integrated with
Highlight.js, supporting code highlighting for numerous programming languages. -
Math Formulas: Integrated with
KaTeX, supporting both Inline ($E=mc^2$ ) and Block ($$\sum$$ ) LaTeX math formulas. - Diagram Support: Integrated with Mermaid.js, supporting flowcharts, Gantt charts, sequence diagrams, class diagrams, mind maps, and more.
-
Security: Uses
DOMPurifyfor HTML sanitization to prevent XSS attacks.
- Local File Access: Directly read from and save to local
.mdfiles. - Multi-Encoding Support: Handles character encoding issues; supports UTF-8, Big5 (Traditional Chinese), GBK (Simplified Chinese), and Shift_JIS (Japanese).
Since this project uses native ES Modules (<script type="module">), browser CORS security policies prevent it from being opened by simply double-clicking index.html. You need to run it via a local server.
- Install the VS Code extension: Live Server.
- Open the project folder in VS Code.
- Right-click
index.htmland select "Open with Live Server".
If you have Python installed, navigate to the project directory in your terminal and run:
# Python 3
python -m http.server 8000Then, open your browser and visit http://localhost:8000.
If you have a Node.js environment:
npx http-server$$
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
$$```mermaid
graph TD;
A[Start] --> B{Is it Happy?};
B -- Yes --> C[Keep it up];
B -- No --> D[Eat something good];
D --> B;
```This project is developed entirely using Vanilla JavaScript with no build step required.
- Core: HTML5, CSS3, JavaScript (ES Modules)
- Markdown Parsing: Marked.js
- Math Rendering: KaTeX
- Diagram Rendering: Mermaid.js
- Code Highlighting: Highlight.js
- HTML Sanitization: DOMPurify
- Icons: Font Awesome
.
├── index.html # Main entry page
├── style.css # Stylesheets
├── icon.png # Application icon
├── js/
│ ├── main.js # Entry point
│ ├── editor.js # Editor core logic
│ ├── markdown.js # Markdown parsing & extension config
│ ├── count.js # Word count logic
│ ├── file.js # File I/O handling
│ ├── search.js # Search & replace functionality
│ └── utils.js # Utility functions (Debounce, etc.)
└── README.md # Documentation
Contributions are welcome! Please feel free to submit a Pull Request or report an Issue.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License.


