Skip to content

Plan: CreatorTrack pages editor primitives

URL: https://mkdocs.justinsforge.com/memory/plans/creatortrack-pages-editor-primitives-2026-07-08/

Date: 2026-07-08 Repo: /home/justinwieb/creatortrack branch feat/pages-editor-primitives Approved spec: Rebuild core text-editing primitives on the existing multi-host block editor so selection, delete, cut, type-over, paste-over, and marquee feel native (Notion/Google Docs). Keep slash/icons/banner/chrome. No TipTap migration this branch. Comments, collab, full markdown interchange, and mobile IME stay on the sequenced roadmap (Phases 3–8).

Out of scope (this branch): - TipTap/ProseMirror migration - Comments / emoji reactions - Real-time collab cursors / CRDT - Full page markdown import/export overhaul - Mobile IME polish

Task list

Task 1: Selection helpers module

  • Files: /home/justinwieb/creatortrack/components/workspace/editorSelection.ts (new)
  • What: Pure helpers: resolve multi-block selection from DOM, extract residual HTML before/after a range inside a host, list block ids covered by a range or lasso, empty-block edge anchors for marquee.
  • Verification: npx tsc --noEmit includes the new file without errors.
  • Commit: feat(editor): selection model helpers for multi-block ops

Task 2: Multi-block delete / cut / type-over / paste-over

  • Files: /home/justinwieb/creatortrack/components/workspace/BlockList.tsx
  • What: Document-level handlers so a non-collapsed multi-block (or multi-char) selection is deleted as one history entry (Notion merge: keep prefix of first + suffix of last, drop middles). Cut = copy + that delete. Printable keys and paste replace the selection first.
  • Verification: On dev.creatortrack.ai, select 8+ bullets mid-page, press Delete: all selected content gone, one undo restores it.
  • Commit: fix(editor): multi-block delete, cut, type-over, paste-over

Task 3: Harden cross-block drag select + marquee

  • Files: BlockList.tsx, /home/justinwieb/creatortrack/app/(suite)/workspace.css, blocks.module.css
  • What: Drive selection earlier (not only after leaving the first block when jittery); marquee selects empty blocks via host anchors + block-set highlight chrome; selected block ids track for delete.
  • Verification: Empty-space drag over empty bullets highlights them; Delete removes them.
  • Commit: fix(editor): marquee + drag-select empty blocks and block chrome

Task 4: Multi-block indent + turn-into (Phase 2 slice)

  • Files: BlockList.tsx
  • What: Tab/Shift-Tab and toolbar turn-into apply to every block in the current multi-block selection (or block-set), one history entry.
  • Verification: Lasso 4 bullets, Tab once, all indent; turn-into numbered works on the set.
  • Commit: feat(editor): multi-block indent and turn-into

Task 5: Dogfood verify + docs

  • Files: forge plan check-off; optional memory/general/reference_creatortrack_editor_primitives.md
  • What: Browser dogfood on dense multi-bullet page; document the selection model + known limits.
  • Verification: Checklist in plan marked done; tsc --noEmit clean.
  • Commit: docs(editor): primitives dogfood notes