Skip to content

Add mixed ordered/unordered list support (Notion-style)#8

Open
jondkinney wants to merge 1 commit intomainfrom
mixed-list-support
Open

Add mixed ordered/unordered list support (Notion-style)#8
jondkinney wants to merge 1 commit intomainfrom
mixed-list-support

Conversation

@jondkinney
Copy link
Copy Markdown
Member

@jondkinney jondkinney commented Mar 27, 2026

Summary

  • Per-item bullet/number toggling within a single list (Notion-style)
  • Opt-in via mixedLists config flag (default: true), disable with mixed-lists="false"
  • Keyboard shortcuts: - toggles to bullet, 1. toggles to numbered
  • Turn-into wraps content in-place inside list items (headings, code, quotes)
  • Code block and table exit creates sibling list item when wrapped
  • HTML round-trip via data-list-item-type attribute

Test plan

  • In a numbered list, type - or * at start of item — toggles to bullet
  • In a bullet list, type 1. — toggles to numbered
  • Click bullet button while in numbered item — toggles just that item
  • Set mixed-lists="false" on editor — feature disabled
  • Save and reload — mixed list state persists

🤖 Generated with Claude Code

@jondkinney jondkinney force-pushed the mixed-list-support branch 5 times, most recently from 361e60c to 26201ad Compare March 27, 2026 21:08
Allow individual list items to independently display as bullet or numbered
within the same list, matching Notion's mixed list behavior. The feature
is opt-in via the mixedLists configuration flag (default: true), and can
be disabled per-editor with mixed-lists="false".

Node model:
- EarlyEscapeListItemNode gains __listItemType property
- getEffectiveListType() resolves: explicit override → parent list type
- createDOM/updateDOM set data-list-item-type on <li> for CSS targeting

Per-item toggling:
- Command dispatcher toggles just the current item's type
- Toolbar pressed state reflects per-item effective type

Keyboard shortcuts:
- "- " or "* " in a numbered item toggles to bullet
- "1. " in a bullet item toggles to numbered

Wrapped blocks in list items:
- Turn-into wraps content in-place (headings, code, quotes)
- Code block and table exit creates sibling list item when wrapped

Configuration:
- mixedLists: true in default preset, opt-out with mixed-lists="false"
- FormatEscapeExtension gates features behind supportsMixedLists

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant