Vditor is a TypeScript Markdown editor for the browser with WYSIWYG, instant rendering, and split preview modes for web and framework integration.
Overview
Vditor is a browser-side Markdown editor aimed at sites that need different editing experiences in one component. It supports three modes: WYSIWYG rich text, instant rendering similar to Typora-style editing, and traditional split-view preview for large screens.
The editor implements CommonMark and GitHub Flavored Markdown, plus extensions such as footnotes, tables of contents, and custom heading IDs. Rendering covers Mermaid diagrams, Graphviz, WaveDrom, ECharts charts, abc.js music notation, and MathJax or KaTeX math. Documented tooling includes export, lazy-loaded images, task lists, multi-platform preview presets, theme switching, and copy flows aimed at WeChat public accounts and Zhihu.
Integration options include npm CommonJS usage, plain script tags, and bindings for JavaScript, Vue, React, Angular, and Svelte. The website also mentions a desktop edition alongside the web component. Configuration spans toolbars, upload handlers with CORS, localStorage autosave, recording, HTML-to-Markdown paste, XSS sanitization, outline panels, and extensive preview theming for content and code blocks.
Chinese typography helpers can insert spaces between Chinese and Western text, fix terminology spelling, and adjust punctuation. Most features are toggled through options so hosts can tailor behavior to their application.
Key features
- WYSIWYG, instant render, and split preview
- CommonMark and GFM syntax support
- Mermaid, charts, math, and diagram rendering
- Customizable toolbar and upload pipeline
- Multi-theme editor and preview styling
- Framework bindings for Vue and React
- Autosave via localStorage cache
- Export and platform-specific preview actions
Use cases
- Embedding Markdown editing in web apps
- Offering both rich-text and source-style editing
- Publishing workflows with WeChat or Zhihu copy
- Technical docs with math and diagrams
- Mobile-friendly browser editing experiences