mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-28 09:29:49 +02:00
Don't normalize when applying transforms
This commit is contained in:
@@ -52,9 +52,8 @@ class State extends new Record(DEFAULTS) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const state = new State({ document, selection })
|
const state = new State({ document, selection })
|
||||||
|
|
||||||
// transform.apply will normalize the document
|
|
||||||
return state.transform()
|
return state.transform()
|
||||||
|
.normalize()
|
||||||
.apply({ save: false })
|
.apply({ save: false })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -56,7 +56,7 @@ class Transform {
|
|||||||
let { merge, save, isNative = false, normalize = true } = options
|
let { merge, save, isNative = false, normalize = true } = options
|
||||||
|
|
||||||
// Ensure that the state is normalized.
|
// Ensure that the state is normalized.
|
||||||
if (normalize) transform = transform.normalize()
|
// if (normalize) transform = transform.normalize()
|
||||||
|
|
||||||
let { state, operations } = transform
|
let { state, operations } = transform
|
||||||
let { history } = state
|
let { history } = state
|
||||||
|
Reference in New Issue
Block a user