Merge branch 'fix_split_node_missing_properties' of github.com:xliulian/slate-collaborative

This commit is contained in:
curd 2021-01-18 14:01:01 +03:00
commit afe29e538e

View File

@ -8,7 +8,10 @@ const splitNode = (doc: SyncValue, op: SplitNodeOperation): SyncValue => {
const [parent, index]: [any, number] = getParent(doc, op.path)
const target = getChildren(parent)[index]
const inject = cloneNode(target)
const inject = {
...cloneNode(target),
...op.properties
}
if (target.text) {
target.text.length > op.position &&