This is a Markdown Editor - a modern, feature-rich web application built with React, TypeScript, and Vite. It provides real-time preview, syntax highlighting, and comprehensive export capabilities. All processing is done client-side for privacy and performance.
Current Version: 1.0.0 (Stable Release)
- ✅ Live markdown preview with synchronized scrolling
- ✅ Syntax highlighting for 180+ languages
- ✅ LaTeX math rendering with KaTeX
- ✅ Dark/light mode with persistence
- ✅ Auto-save to localStorage
- ✅ GitHub Flavored Markdown support
- ✅ PDF export with syntax highlighting
- ✅ DOCX export with proper formatting
- ✅ Markdown file download
- ✅ Copy as Markdown/HTML/Plain Text
- ✅ Command Palette (Ctrl/Cmd+K)
- ✅ Comprehensive keyboard shortcuts
- ✅ Resizable split panes
- ✅ Modal system for exports and settings
- ✅ Help documentation
{
"react": "18.3.1",
"typescript": "5.2.2",
"vite": "5.0.10",
"tailwindcss": "4.0.0-beta.4",
"zustand": "5.0.2",
"marked": "14.1.2",
"highlight.js": "11.10.0",
"katex": "0.16.11",
"jspdf": "2.5.2",
"docx": "9.0.2"
}markdown-editor/
├── src/
│ ├── components/
│ │ ├── modals/ # Modal components (Export, Copy, etc.)
│ │ ├── CommandPalette/ # Command palette component
│ │ ├── Editor/ # Markdown editor
│ │ ├── Preview/ # Preview pane
│ │ ├── Layout/ # Layout components
│ │ └── Help/ # Help documentation
│ ├── hooks/ # Custom React hooks
│ ├── lib/
│ │ └── export/ # Export utilities (PDF, DOCX, MD)
│ ├── stores/ # Zustand state management
│ ├── utils/ # Utility functions
│ └── types/ # TypeScript definitions
├── docs/ # Comprehensive documentation
│ ├── ARCHITECTURE.md # System architecture with PlantUML diagrams
│ ├── API.md # Component and utility API docs
│ ├── DEVELOPER_GUIDE.md # Development setup and workflow
│ ├── DEPLOYMENT.md # Deployment instructions
│ ├── SPECIFICATION.md # Feature specification (planned vs implemented)
│ ├── TECHNICAL_SPEC.md # Technical implementation details
│ └── adr/ # Architecture Decision Records
├── tests/
│ └── plans/ # Test plans and QA documentation
└── dist/ # Production build output
- DO NOT make git commits unless explicitly ordered to do so
- User needs to validate work before commits
- Always show what will be committed before committing
- Use TypeScript with strict type checking
- Follow existing code patterns and conventions
- Add JSDoc comments for all exported functions/components
- Use Tailwind CSS utilities, avoid custom CSS
- Ensure dark mode support for all UI changes
- Use Zustand stores for shared state
- Persist user preferences to localStorage
- Keep component state local when possible
Before any changes:
- Run
npm run buildto ensure no build errors - Test all export formats (PDF, DOCX, Markdown)
- Verify keyboard shortcuts still work
- Check dark mode appearance
- Test in Chrome, Firefox, and Safari
- Check existing patterns in similar components
- Update relevant Zustand store if needed
- Add keyboard shortcut if applicable
- Update help documentation
- Test thoroughly before marking complete
- Reproduce the issue first
- Check browser console for errors
- Review relevant component and store code
- Test fix across all browsers
- Ensure no regression in other features
- Edit
src/hooks/useKeyboardShortcuts.ts - Check for conflicts with existing shortcuts
- Update help documentation
- Add to command palette if applicable
- Export code is in
src/lib/export/ - Test with various markdown content
- Ensure proper error handling
- Check output quality and formatting
- Mobile browser support is limited
- Large documents may impact performance
- Mermaid diagram support not implemented
# Development
npm install
npm run dev
# Production build
npm run build
npm run preview
# The dist/ folder contains static files ready for deploymentsrc/App.tsx- Main application componentsrc/stores/editorStore.ts- Editor content and settingssrc/stores/modalStore.ts- Modal visibility statessrc/hooks/useKeyboardShortcuts.ts- All keyboard shortcutssrc/lib/export/- Export functionalitysrc/components/CommandPalette/CommandPalette.tsx- Command palette
Always refer to these docs for detailed information:
/docs/ARCHITECTURE.md- System design and architecture/docs/API.md- Component and utility APIs/docs/DEVELOPER_GUIDE.md- Development workflow/docs/adr/- Architecture decisions and rationale
- Implemented comprehensive keyboard shortcuts
- Added command palette with fuzzy search
- Created three copy formats (Markdown, HTML, Plain Text)
- Fixed scroll synchronization to be bidirectional
- Resolved keyboard shortcut conflicts
- Enhanced dark mode styling
- Improved plain text copy formatting
- Fixed PDF export for large documents
- Fixed DOCX export TypeScript errors
- Reorganized project structure
- Created comprehensive documentation
- Read First: Always check the relevant documentation before making changes
- Test Thoroughly: Use the manual testing checklist in DEVELOPER_GUIDE.md
- Preserve Features: Don't break existing functionality
- Document Changes: Update relevant documentation and CHANGELOG.md
- Follow Patterns: Maintain consistency with existing code patterns
Remember: This is a production-ready application. Quality and stability are paramount.