-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Description
Background
Quill's editor logic is currently mixed with browser-specific code, making it difficult to test, reason about, and maintain. The document model, editing operations, and DOM manipulation are intertwined.
Objective
Extract an editor core that models the document and editing operations independently of the browser. This core should:
- Handle document state and transformations
- Manage cursor and selection logic
- Provide editing operations (insert, delete, etc.)
- Be testable without a browser
The web frontend will then use this core, translating between DOM events and core operations.
Design Considerations
Key areas to separate:
- Document Model: Already partially exists in
quill_markdown.ml, needs to be fully independent - Editor State: Cursor position, selection, editing mode
- Operations: Insert text, delete, move cursor, etc. as pure functions
- Browser Concerns: DOM manipulation, contenteditable quirks, event handling
Success Criteria
- Editor core with no browser/DOM dependencies
- Web frontend maintains all current functionality
- Core logic is unit testable
- Clear separation of concerns between core and web
Metadata
Metadata
Assignees
Labels
No labels