mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-29 18:09:49 +02:00
Normalize selection after normalizing document
This commit is contained in:
@@ -146,7 +146,8 @@ import {
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
normalize,
|
normalize,
|
||||||
normalizeWith
|
normalizeWith,
|
||||||
|
normalizeSelection
|
||||||
} from './normalize'
|
} from './normalize'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -289,6 +290,7 @@ export default {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
normalize,
|
normalize,
|
||||||
normalizeWith
|
normalizeWith,
|
||||||
|
normalizeSelection
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -60,7 +60,9 @@ export function normalizeWith(transform, schema, node, prevNode) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export function normalize(transform) {
|
export function normalize(transform) {
|
||||||
return transform.normalizeWith(defaultSchema)
|
return transform
|
||||||
|
.normalizeWith(defaultSchema)
|
||||||
|
.normalizeSelection()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user