diff --git a/lib/transforms/at-range.js b/lib/transforms/at-range.js index 43619f1fd..cd86507cf 100644 --- a/lib/transforms/at-range.js +++ b/lib/transforms/at-range.js @@ -613,19 +613,14 @@ export function removeMarkAtRange(transform, range, mark) { */ export function setBlockAtRange(transform, range, properties = {}) { - let { state } = transform - properties = Normalize.nodeProperties(properties) - let { document } = state + const { state } = transform + const { document } = state const blocks = document.getBlocksAtRange(range) blocks.forEach((block) => { - block = block.merge(properties) - document = document.updateDescendant(block) + transform.setNodeByKey(block.key, properties) }) - document = document.normalize() - state = state.merge({ document }) - transform.state = state return transform }