fix some react ts issues
This commit is contained in:
@@ -100,10 +100,7 @@ export class PureEditorContent extends React.Component<EditorContentProps, Edito
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div ref={this.editorContentRef} />
|
<div ref={this.editorContentRef} />
|
||||||
{
|
<Portals renderers={this.state.renderers} />
|
||||||
// @ts-ignore
|
|
||||||
<Portals renderers={this.state.renderers} />
|
|
||||||
}
|
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ class ReactNodeView extends NodeView<React.FunctionComponent, Editor> {
|
|||||||
return string.charAt(0).toUpperCase() + string.substring(1)
|
return string.charAt(0).toUpperCase() + string.substring(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// @ts-ignore
|
|
||||||
this.component.displayName = capitalizeFirstChar(this.extension.config.name)
|
this.component.displayName = capitalizeFirstChar(this.extension.config.name)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -55,12 +54,8 @@ class ReactNodeView extends NodeView<React.FunctionComponent, Editor> {
|
|||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
// @ts-ignore
|
|
||||||
<ReactNodeViewContext.Provider value={{ onDragStart, isEditable }}>
|
<ReactNodeViewContext.Provider value={{ onDragStart, isEditable }}>
|
||||||
{
|
<Component {...componentProps} />
|
||||||
// @ts-ignore
|
|
||||||
<Component {...componentProps} />
|
|
||||||
}
|
|
||||||
</ReactNodeViewContext.Provider>
|
</ReactNodeViewContext.Provider>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
11
packages/react/tsconfig.json
Normal file
11
packages/react/tsconfig.json
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"extends": "../../tsconfig",
|
||||||
|
"compilerOptions": {
|
||||||
|
"jsx": "react",
|
||||||
|
},
|
||||||
|
"exclude": [
|
||||||
|
"**/node_modules",
|
||||||
|
"**/dist",
|
||||||
|
"../vue-3",
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -33,6 +33,7 @@
|
|||||||
],
|
],
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"**/node_modules",
|
"**/node_modules",
|
||||||
"**/dist"
|
"**/dist",
|
||||||
|
"**/vue-3"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user