-
Notifications
You must be signed in to change notification settings - Fork 16
feat: Add task list support to text editor #3690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Add task list schema with proper parseDOM and toDOM mappings - Add task list item schema with checked attribute support - Add task list commands for creation and toggling - Add task list plugin with Enter key handling - Add task list node view with interactive checkboxes - Add task list styling with bullet suppression
- Add task list menu command with active state detection - Add task list menu item with checkbox icon to toolbar - Add task list to EditorMenuTypes for type safety - Add translations for task list button in EN, NO, and SV
- Add task list schema to ProseMirror document schema - Register task list item node view for interactive checkboxes - Add task list plugin to editor plugin chain - Import task list styles into main adapter stylesheet
- Add task list serialization to markdown (- [ ] and - [x] syntax) - Extend markdown parser whitelist for task list classes and input elements - Add support for remark-gfm generated contains-task-list class - Add HTML transformation to wrap task list text in paragraph elements - Enable bidirectional conversion between markdown and task lists
- Add universal list indentation plugin for both regular and task lists - Support Tab key to indent (nest deeper) list items - Support Shift-Tab key to outdent (nest shallower) list items - Maintain editor focus when Tab is pressed outside list contexts - Use dedicated task list commands for proper indentation handling
- Add comprehensive task list example component with markdown content - Include example of both task lists and regular lists for comparison - Add keyboard shortcuts documentation in example - Add task list example reference to text editor component documentation
Update package-lock.json with dependency changes from task list implementation
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🧪 Early access (Sonnet 4.5): enabledWe are currently testing the Sonnet 4.5 model, which is expected to improve code review quality. However, this model may lead to increased noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience. Note:
Comment |
Had a little (read a lot of) help from a co-driver creating this hack ✅✅✅ |
Documentation has been published to https://lundalogik.github.io/lime-elements/versions/PR-3690/ |
- Remove bullet points from task list items - Add flexbox layout for proper checkbox and text alignment - Make checkboxes interactive and properly styled - Remove paragraph wrapping that caused text to appear on new lines - Add hover and focus states for better UX - Update composite example to showcase task list functionality Fixes issues where: - Task list checkboxes appeared disabled/non-clickable - Text content wrapped to new lines - Bullet points still appeared alongside checkboxes
- Remove disabled attribute from GFM-generated checkboxes to make them interactive - Add taskListChange event emitter to limel-markdown component - Implement checkbox click handlers that update source markdown text - Add two-way binding in composite example for real-time sync - Parse task list positions and map to corresponding markdown lines - Support nested task lists with proper indentation preservation - Use safe regex patterns to avoid backtracking vulnerabilities Interactive features: - Click checkboxes in rendered markdown to toggle state - Automatically updates source markdown (- [ ] ↔ - [x]) - Real-time sync between textarea and rendered output - Preserves indentation and formatting in nested lists Fixes the core issue where remark-gfm generates disabled checkboxes by default, making them truly interactive for task management workflows.
📝 Description
This PR adds comprehensive task list (checkbox) support to the
limel-text-editor
component. Users can now create, interact with, and manage task lists with native HTML checkboxes, full keyboard navigation, and markdown support.✨ Features Added
Core Task List Functionality
<input type="checkbox">
elements that respond to clicks- [ ]
and- [x]
)ProseMirror Integration
task_list
andtask_list_item
node types with proper DOM parsingTaskListItemView
for interactive checkbox renderingprosemirror-schema-list
for list operationsEnhanced User Experience
🎯 Usage
Basic Usage
Keyboard Shortcuts
Indent/outdent: Tab / Shift+Tab
Toggle checkbox: Click on checkbox or Space when focused
✅ Testing