How to Extract Comment and Cited Text from Rich Text Using Indices

Here is the follow-up of this topic, which uses a more reliable approach:

Aggregating Inline Comments into Structured Entities: A Script to Overcome Fibery’s ProseMirror API Limits - Fibery Showcase - Fibery.io Community