refactoring
This commit is contained in:
@@ -6,19 +6,14 @@ export interface NodeViewContentProps {
|
||||
}
|
||||
|
||||
export const NodeViewContent: React.FC<NodeViewContentProps> = props => {
|
||||
// TODO
|
||||
// @ts-ignore
|
||||
const { isEditable } = useReactNodeView()
|
||||
|
||||
const Tag = props.as || 'div'
|
||||
|
||||
return (
|
||||
<Tag
|
||||
data-node-view-content=""
|
||||
contentEditable={isEditable}
|
||||
style={{
|
||||
whiteSpace: 'pre-wrap'
|
||||
}}
|
||||
style={{ whiteSpace: 'pre-wrap' }}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user