diff --git a/packages/slate-react/src/plugin/with-react.ts b/packages/slate-react/src/plugin/with-react.ts index 6b9204077c..f29f4255c3 100644 --- a/packages/slate-react/src/plugin/with-react.ts +++ b/packages/slate-react/src/plugin/with-react.ts @@ -148,7 +148,7 @@ export const withReact = (editor: T) => { if (fragment) { const decoded = decodeURIComponent(window.atob(fragment)) const parsed = JSON.parse(decoded) as Node[] - Transforms.insertFragment(e, parsed) + e.insertFragment(parsed) return } @@ -163,7 +163,7 @@ export const withReact = (editor: T) => { Transforms.splitNodes(e, { always: true }) } - Transforms.insertText(e, line) + e.insertText(line) split = true } }