mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-07-31 20:40:19 +02:00
Use ByKey instead of NodeOperation in wrapBlockAtRange
This commit is contained in:
@@ -802,11 +802,7 @@ export function wrapBlockAtRange(transform, range, block) {
|
||||
}
|
||||
|
||||
// inject the new block node into the parent
|
||||
if (parent != document) {
|
||||
transform.insertNodeByKey(parent.key, index, block)
|
||||
} else {
|
||||
transform.insertNodeOperation([], index, block)
|
||||
}
|
||||
|
||||
// move the sibling nodes into the new block node
|
||||
siblings.forEach((node, i) => {
|
||||
|
Reference in New Issue
Block a user