There was an error while loading. Please reload this page.
1 parent 110b5da commit e280a02Copy full SHA for e280a02
1 file changed
packages/core/src/helpers/getTextContentFromNodes.ts
@@ -9,7 +9,7 @@ export const getTextContentFromNodes = ($from: ResolvedPos, maxMatch = 500) => {
9
(node, pos, parent, index) => {
10
textBefore += node.type.spec.toText?.({
11
node, pos, parent, index,
12
- }) || node.textContent || '%leaf%'
+ }) || $from.nodeBefore?.text || '%leaf%'
13
},
14
)
15
0 commit comments