UNPKG

prosemirror-flat-list

Version:
14 lines (11 loc) 355 B
import type { NodeRange } from 'prosemirror-model' import { cutByIndex } from './cut-by-index' /** * Return a debugging string that describes this range. * * @internal */ export function rangeToString(range: NodeRange): string { const { parent, startIndex, endIndex } = range return cutByIndex(parent.content, startIndex, endIndex).toString() }