Expose "range" to textSerializer. Used in "getTextBetween"

This commit is contained in:
Ivan Pantic
2022-04-05 17:27:25 +02:00
committed by Dominik
parent 0fb68af3a1
commit feef365b53
2 changed files with 2 additions and 0 deletions

View File

@@ -31,6 +31,7 @@ export function getTextBetween(
pos, pos,
parent, parent,
index, index,
range,
}) })
} else if (node.isText) { } else if (node.isText) {
text += node?.text?.slice(Math.max(from, pos) - pos, to - pos) text += node?.text?.slice(Math.max(from, pos) - pos, to - pos)

View File

@@ -244,6 +244,7 @@ export type TextSerializer = (props: {
pos: number, pos: number,
parent: ProseMirrorNode, parent: ProseMirrorNode,
index: number, index: number,
range: Range,
}) => string }) => string
export type ExtendedRegExpMatchArray = RegExpMatchArray & { export type ExtendedRegExpMatchArray = RegExpMatchArray & {