On the chunking - I looked into doing it with elm/regex which is easy to do:
Regex.fromString "\\n(?=\\w)"
|> Maybe.withDefault Regex.never
|> (\r -> Regex.split r source)
But for interactive work, I will also need to know the start and end positions of each chunk. For that reason, I think it may make sense to write the initial chunker using elm/parser.
Or perhaps I should start by splitting into individual lines, and then grouping them into chunks. That might work better, as the editor could be backed by an array-of-lines model.