1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-16 12:14:14 +02:00

fix normalization for inserting inlines and blocks

This commit is contained in:
Ian Storm Taylor
2016-08-18 12:39:54 -07:00
parent 417e1484c5
commit 24f36862d6
2 changed files with 2 additions and 3 deletions

View File

@@ -258,6 +258,7 @@ export function insertBlockAtRange(transform, range, block) {
transform.insertNodeByKey(parent.key, index + 1, block)
}
transform.normalizeDocument()
return transform
}
@@ -374,6 +375,7 @@ export function insertInlineAtRange(transform, range, inline) {
transform.splitNodeByKey(startKey, startOffset)
transform.insertNodeByKey(parent.key, index + 1, inline)
transform.normalizeDocument()
return transform
}

View File

@@ -16,9 +16,6 @@ nodes:
nodes:
- kind: text
text: rd
- kind: inline
type: hashtag
nodes:
- kind: inline
type: link
nodes: