Writenex is a modern WYSIWYG Markdown editor built with Next.js 15+, offering a powerful yet simple writing experience. All your documents are stored locally. No servers, no tracking, no data collection.
Live: writenex.com
Table of Contents
- WYSIWYG Editor: Real-time visual editing powered by MDXEditor
- Markdown Support: Full support for headings, bold, italic, underline, strikethrough, code, lists, blockquotes, tables, and more
- Syntax Highlighting: Code blocks with language-specific syntax highlighting
- View Modes: Switch between Edit, Split, and Source modes
- Tabbed Interface: Work on multiple documents with browser-like tabs
- Quick Switching: Use
Alt+1-9to jump to specific documents - Tab Navigation: Navigate between tabs with
Alt+←andAlt+→ - Rename on Double-Click: Easily rename documents by double-clicking the tab
- Per-Document Version History: Each document maintains its own version history
- Toggle read-only mode with visual indicators
- All editing features properly disabled
- Keyboard shortcut:
Ctrl+Shift+R/Cmd+Shift+R - Persisted state across page reloads
- Distraction-free writing with all UI hidden
- Hover-to-reveal header at top edge
- Floating exit button (bottom-right)
- Keyboard shortcuts:
Ctrl+Shift+Eto toggle,Escapeto exit - Smooth transitions for show/hide animations
- Auto-generated from document headings (H1-H6)
- Smart parsing that skips frontmatter and code blocks
- Visual hierarchy with indentation based on heading level
- Click to jump to heading with smooth scroll
- Active heading highlight based on scroll position
- Collapsible sidebar panel (left side)
- Toggle via toolbar button or
Alt+Tshortcut - Panel state persisted across sessions
- Hidden in Focus Mode
- Event-based snapshots saved to IndexedDB
- Up to 50 versions stored per document
- One-click restore to previous versions
- Version comparison with diff view
- Special "Before Clear" snapshots for recovery
- Real-time panel updates when new versions are created
- Real-time search with match highlighting
- Replace single or all occurrences
- Case-sensitive and whole word matching
- Regular expression support
- Replace disabled in read-only mode
- Real-time word, character, and line counts
- Reading time estimation
- Cursor position tracking
- Available in all modes including read-only
| Category | Shortcut | Action |
|---|---|---|
| Formatting | Ctrl+B |
Bold |
Ctrl+I |
Italic | |
Ctrl+U |
Underline | |
Ctrl+Shift+S |
Strikethrough | |
Ctrl+Shift+C |
Inline Code | |
| Blocks | Ctrl+Alt+1-6 |
Heading 1-6 |
Ctrl+Shift+7 |
Ordered List | |
Ctrl+Shift+8 |
Unordered List | |
Ctrl+Shift+9 |
Checklist | |
Ctrl+Shift+Q |
Blockquote | |
| Actions | Ctrl+Z |
Undo |
Ctrl+Shift+Z |
Redo | |
Ctrl+S |
Save | |
Ctrl+K |
Insert Link | |
Ctrl+Alt+I |
Insert Image | |
Ctrl+Shift+Delete |
Clear Editor | |
| Documents | Alt+N |
New Document |
Alt+W |
Close Document | |
Alt+→ |
Next Document | |
Alt+← |
Previous Document | |
Alt+1-9 |
Switch to Document 1-9 | |
| Navigation | Alt+T |
Table of Contents |
Ctrl+F |
Search & Replace | |
Enter |
Next Match (in search) | |
Shift+Enter |
Previous Match (in search) | |
Ctrl+H |
Version History | |
Escape |
Close Modals/Panels/Focus Mode | |
| Modes | Ctrl+Shift+R |
Toggle Read-Only |
Ctrl+Shift+E |
Toggle Focus Mode | |
Ctrl+/ |
Keyboard Shortcuts | |
F1 |
Help & Welcome Tour |
- Copy Markdown: Copy raw markdown to clipboard
- Copy HTML: Copy rendered HTML fragment to clipboard (for pasting into CMS/email)
- Download as
.md: Export document as Markdown file - Download as
.html: Export document as standalone HTML page with embedded styling - Images stored in IndexedDB are automatically converted to base64 for portability
- Full keyboard navigation
- ARIA labels and announcements
- Screen reader compatible
- Skip to content link
- Focus management for modals
- Framework: Next.js 16 (App Router, PWA-enabled)
- Language: TypeScript 5 (Strict mode)
- Styling: Tailwind CSS 4 with @tailwindcss/typography
- Editor: MDXEditor powered by Lexical
- State Management: Zustand
- Database: Dexie (IndexedDB wrapper)
- UI Components: Radix UI (shadcn/ui style)
- Icons: Lucide React
- Markdown Processing: Marked, Remark, Unified
- Syntax Highlighting: Shiki
- Diff Viewer: react-diff-viewer-continued
- PWA: @ducanh2912/next-pwa
This app is part of the Writenex monorepo. See the root README for setup instructions.
# From monorepo root
pnpm dev
# Open in browser
# Landing page: http://localhost:3000
# Editor: http://localhost:3000/editorZustand was chosen for its simplicity and performance. The store manages:
- Document list and active document
- Editor content and settings
- UI state (modals, panels)
- Read-only mode
- Theme preferences
- Statistics
Dexie provides a clean API for IndexedDB operations:
- Documents table: Store multiple documents with metadata and content
- Versions table: Per-document version history (up to 50 per document)
- Settings: User preferences persistence
- Auto-save: Debounced 3-second save to document table (single source of truth)
- Version snapshots: Created on specific events:
- User idle for 30 seconds + 5 minutes since last snapshot
- Manual save (Ctrl+S)
- Before clearing editor (labeled "Before Clear")
- Switching documents
- Real-time updates: Version history panel updates instantly when snapshots are created
MDXEditor provides a robust WYSIWYG experience with:
- Plugin architecture for extensibility
- Native markdown shortcut support
- Split view and source mode
- Code block syntax highlighting
- Separation of concerns: UI components are separated from editor-specific logic
- Composition: Complex features built from smaller, reusable components
- Accessibility-first: ARIA attributes and keyboard navigation built-in
Writenex works on all modern browsers that support IndexedDB:
- Chrome/Edge 90+
- Firefox 88+
- Safari 14+
- Opera 76+
This project is licensed under the MIT License - see the LICENSE file for details.