diff --git a/packages/fields-document/src/DocumentEditor/editor-shared.ts b/packages/fields-document/src/DocumentEditor/editor-shared.ts index bd3c6db59b3..66eee2a19af 100644 --- a/packages/fields-document/src/DocumentEditor/editor-shared.ts +++ b/packages/fields-document/src/DocumentEditor/editor-shared.ts @@ -10,7 +10,7 @@ import { createEditor, } from 'slate' import { withHistory } from 'slate-history' -import { withReact } from 'slate-react' +// import { withReact } from 'slate-react' import { type ComponentBlock } from './component-blocks/api-shared' import { type DocumentFeatures } from '../views-shared' @@ -170,7 +170,7 @@ export function createDocumentEditor ( withDocumentFeaturesNormalization( documentFeatures, relationships, - withHistory(withReact(createEditor())) + withHistory(createEditor()) ) ) ) diff --git a/packages/fields-document/src/DocumentEditor/utils.ts b/packages/fields-document/src/DocumentEditor/utils.ts index 0e97bf7f54a..62c1923532e 100644 --- a/packages/fields-document/src/DocumentEditor/utils.ts +++ b/packages/fields-document/src/DocumentEditor/utils.ts @@ -10,7 +10,7 @@ import { Text, Transforms, } from 'slate' -import { ReactEditor } from 'slate-react' +// import { ReactEditor } from 'slate-react' import { type ElementFromValidation } from '../structure-validation' export type Mark = @@ -92,7 +92,7 @@ export function insertNodesButReplaceIfSelectionIsAtEmptyParagraphOrHeading ( Transforms.removeNodes(editor, { at: path }) // even though the selection is in the right place after the removeNodes // for some reason the editor blurs so we need to focus it again - ReactEditor.focus(editor) +// ReactEditor.focus(editor) } }