1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-24 17:23:07 +01:00

Normalize selection after normalizing document

This commit is contained in:
Samy Pesse 2016-10-19 22:54:38 +02:00
parent a67f612065
commit 8346bfc72f
2 changed files with 7 additions and 3 deletions

View File

@ -146,7 +146,8 @@ import {
import {
normalize,
normalizeWith
normalizeWith,
normalizeSelection
} from './normalize'
/**
@ -289,6 +290,7 @@ export default {
*/
normalize,
normalizeWith
normalizeWith,
normalizeSelection
}

View File

@ -60,7 +60,9 @@ export function normalizeWith(transform, schema, node, prevNode) {
*/
export function normalize(transform) {
return transform.normalizeWith(defaultSchema)
return transform
.normalizeWith(defaultSchema)
.normalizeSelection()
}
/**