Add live preview while editing feature

Implemented split-view editor with real-time markdown preview:
- Added Edit/Preview toggle button with toolbar
- Created MarkdownEditor component using NSTextView for raw markdown editing
- Implemented HSplitView with editor on left and live preview on right
- Fixed NSTextView width constraints to prevent unwanted scaling
- Added proper text container configuration for word wrapping
- Text changes update preview in real-time via SwiftUI binding

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
0x8664b2
2025-06-20 10:40:43 -07:00
parent ad55b2308a
commit 732f633086
2 changed files with 142 additions and 4 deletions

View File

@@ -37,7 +37,7 @@ This repository contains a macOS markdown viewer application built with SwiftUI.
- [ ] Export to PDF feature
- [ ] Dark mode support
- [ ] Custom CSS themes
- [ ] Live preview while editing
- [x] Live preview while editing
- [ ] Search within document
- [ ] Zoom in/out functionality
- [ ] Recent files menu