mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-22 15:02:51 +02:00
Merge branch 'master' of github.com:ianstormtaylor/slate
This commit is contained in:
@@ -527,11 +527,15 @@ const Transforms = {
|
||||
if (typeof properties == 'string') {
|
||||
properties = { type: properties }
|
||||
}
|
||||
if (properties.data) {
|
||||
properties.data = Data.create(properties.data)
|
||||
} else {
|
||||
delete properties.data
|
||||
}
|
||||
|
||||
// Update each of the blocks.
|
||||
const blocks = node.getBlocksAtRange(range)
|
||||
blocks.forEach((block) => {
|
||||
if (properties.data) properties.data = Data.create(properties.data)
|
||||
block = block.merge(properties)
|
||||
node = node.updateDescendant(block)
|
||||
})
|
||||
|
Reference in New Issue
Block a user