Addressed multiple critical editing experience issues: Enhanced Markdown Preservation: - Fixed htmlToMarkdown() to properly preserve heading hash signs (# ## ###) - Maintained markdown structure for lists, code blocks, and blockquotes - Preserved inline formatting (bold, italic, code) within paragraphs - Improved spacing and indentation handling for complex structures Font Size & Style Preservation: - Extract and apply original element's font-size to textarea - Preserve line-height from source content for consistent appearance - Use inherit values in CSS, overridden by JavaScript for accuracy - Ensures editing experience matches visual appearance of content Improved Textarea Sizing: - More reasonable height constraints (max 360px vs 400px) - Line-count based minimum height calculation (~24px per line) - Reduced excessive height for short content - Added both horizontal and vertical resize capability - Set minimum width constraint (200px) for better usability CSS Enhancements: - Changed resize from vertical-only to both directions - Added min-width constraint for better proportions - Improved overflow handling (auto vs overflow-y only) - Font properties use inherit with JavaScript override Technical Improvements: - Better content height calculation using actual line count - Proper handling of edge cases in markdown conversion - Maintained smooth transitions while fixing sizing logic - Preserved all existing functionality while fixing issues These fixes ensure that: - Headings preserve their # markers when edited - Font sizes match the original content being edited - Textarea dimensions are proportional and user-controllable - Markdown structure roundtrips accurately 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
60 KiB
60 KiB