This commit is contained in:
Philipp Kühn 2021-04-06 23:00:03 +02:00
parent c83cd59df1
commit 92c2c81b8e
4 changed files with 11 additions and 3 deletions

View File

@ -32,6 +32,7 @@
"prosemirror-view": "^1.18.2"
},
"devDependencies": {
"@types/react": "^17.0.3",
"@types/react-dom": "^17.0.3"
}
}

View File

@ -100,7 +100,10 @@ export class PureEditorContent extends React.Component<EditorContentProps, Edito
return (
<>
<div ref={this.editorContentRef} />
<Portals renderers={this.state.renderers} />
{
// @ts-ignore
<Portals renderers={this.state.renderers} />
}
</>
)
}

View File

@ -55,8 +55,12 @@ class ReactNodeView extends NodeView<React.FunctionComponent, Editor> {
}, [])
return (
// @ts-ignore
<ReactNodeViewContext.Provider value={{ onDragStart, isEditable }}>
<Component {...componentProps} />
{
// @ts-ignore
<Component {...componentProps} />
}
</ReactNodeViewContext.Provider>
)
}

View File

@ -2329,7 +2329,7 @@
dependencies:
"@types/react" "*"
"@types/react@*":
"@types/react@*", "@types/react@^17.0.3":
version "17.0.3"
resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.3.tgz#ba6e215368501ac3826951eef2904574c262cc79"
integrity sha512-wYOUxIgs2HZZ0ACNiIayItyluADNbONl7kt8lkLjVK8IitMH5QMyAh75Fwhmo37r1m7L2JaFj03sIfxBVDvRAg==