Expose "range" to textSerializer. Used in "getTextBetween"
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
@@ -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 & {
|
||||||
|
|||||||
Reference in New Issue
Block a user