Skip to content

Commit

Permalink
wip, fixed, but needs revert
Browse files Browse the repository at this point in the history
  • Loading branch information
dcousens committed May 14, 2024
1 parent 77b64e8 commit 15330dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/fields-document/src/DocumentEditor/editor-shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -170,7 +170,7 @@ export function createDocumentEditor (
withDocumentFeaturesNormalization(
documentFeatures,
relationships,
withHistory(withReact(createEditor()))
withHistory(createEditor())
)
)
)
Expand Down
4 changes: 2 additions & 2 deletions packages/fields-document/src/DocumentEditor/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down Expand Up @@ -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)
}
}

Expand Down

0 comments on commit 15330dc

Please sign in to comment.