Commit graph

10 commits

Author SHA1 Message Date
82bf67fc38
fix: map char level ranges to prosemirror positions
ProseMirror's document model is a tree structure where positions are
calculated by traversing nodes, accounting for structural elements
(opening/closing tags of nodes like paragraphs, lists, etc.). A position
in ProseMirror is not "character index N". Structual boundaries like
"start of paragraph" also get their own index. A document with two
paragraphs "ab" and "cd" has positions:

  0   1 2 3   4   5 6 7   8
  <p> a b </p><p> c d </p>

So when I serialize a ProseMirror document to plain text for external
processing:

   01 234
  "ab\ncd"

I need to save this mapping information so when the external system
says "there's something interesting at characters [3,4]", I can map that
back to ProseMirror positions to do something useful: highlighting,
applying marks, or making selections.

fix: measure site visits
2025-12-03 11:08:39 -08:00
76e4e84716
fix: measure site visitors 2025-12-03 11:08:38 -08:00
91e3ab4cb1
fix: some errors in /about down, many to go 2025-12-03 11:08:38 -08:00
64e176dab5
fix: tweak styles for mobile 2025-11-29 15:17:43 -08:00
49bd94cda2
feat: make version deployable 2025-11-29 13:56:55 -08:00
515a0e6d81
wip: explain intro better 2025-11-04 13:14:50 -08:00
a79a84f224
fix: pick new listen address 2025-11-02 14:25:28 -08:00
8d5bce4bfb
feat: create deployment scripts 2025-11-02 14:16:56 -08:00
78297efe5c
feat: text editor and blog post 2025-11-01 12:08:03 -07:00
9e383ee26e
feat: add empty qwik-city frontend 2025-10-30 17:55:43 -07:00