mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-28 23:59:25 +08:00
refactoring
This commit is contained in:
parent
be776e09f9
commit
e680544b7d
@ -147,6 +147,10 @@ export const Figure = Node.create<FigureOptions>({
|
|||||||
nodes.push(...findChildrenInRange(doc, range, predicate))
|
nodes.push(...findChildrenInRange(doc, range, predicate))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!nodes.length) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
nodes.forEach(({ node, pos }, index) => {
|
nodes.forEach(({ node, pos }, index) => {
|
||||||
const mappedPos = tr.steps
|
const mappedPos = tr.steps
|
||||||
.slice(tr.steps.length - index)
|
.slice(tr.steps.length - index)
|
||||||
|
Loading…
Reference in New Issue
Block a user