-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Feature Request
Description
Add an inline text editing feature to the existing annotation toolbar that allows users to edit the original markdown text and write changes back to the source file.
Requirements
- Extend the current annotation popover toolbar with an "Edit" button
- Support inline editing of the selected text
- Write changes back to the original markdown file
- Constraint: Cannot span multiple lines (same as current annotation behavior)
- Should not break existing annotations
Concerns to Address
-
Annotation preservation: How to handle existing annotations when text is edited?
- Option A: Remove annotations on edited text
- Option B: Try to preserve annotations by adjusting offsets
- Option C: Block editing if text has annotations
-
Multi-line restriction: Maintain consistency with current annotation system
-
File synchronization: Need to handle:
- File write operations
- Concurrent editing conflicts
- WebSocket updates to other viewers
Technical Considerations
- Current annotation system uses character offsets
- Editing text will shift all subsequent offsets
- Need to update annotation database after text edits
- Should integrate with existing popover UI (PopoverManager)
Proposed UI Flow
- User selects text in markdown body
- Annotation toolbar appears with new "Edit" action
- Click "Edit" → text becomes editable inline
- User modifies text
- Press Enter/Save → write back to markdown file
- Update all affected annotations (or remove them)
- Refresh view with updated content
Related Files
assets/js/managers/popover-manager.js- Toolbar UIassets/js/managers/annotation-manager.js- Annotation handling- Server-side markdown file write logic (needs implementation)
Open Questions
- Should this be a separate permission/mode?
- How to handle conflicts with live editing?
- What if the file has changed on disk?
Generated with Claude Code
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request