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

Wrap insertTextAtRange in withoutNormalizing (#2728)

This commit is contained in:
David Hrdlicka
2019-05-02 04:55:29 +02:00
committed by Ian Storm Taylor
parent b448a19b8c
commit 7216fdc1bb

View File

@@ -884,6 +884,7 @@ Commands.insertInlineAtRange = (editor, range, inline) => {
*/
Commands.insertTextAtRange = (editor, range, text, marks) => {
editor.withoutNormalizing(() => {
range = deleteExpandedAtRange(editor, range)
const { value } = editor
@@ -897,6 +898,7 @@ Commands.insertTextAtRange = (editor, range, text, marks) => {
}
editor.insertTextByKey(start.key, offset, text, marks)
})
}
/**