refactor: remove isEditable from node views, remove viewUpdate event

This commit is contained in:
Philipp Kühn
2021-04-07 22:07:36 +02:00
parent 7b1d8d103c
commit a0e2a830d7
14 changed files with 3 additions and 92 deletions

View File

@@ -1,5 +1,4 @@
import React from 'react'
import { useReactNodeView } from './useReactNodeView'
export interface NodeViewContentProps {
className?: string,
@@ -7,14 +6,12 @@ export interface NodeViewContentProps {
}
export const NodeViewContent: React.FC<NodeViewContentProps> = props => {
const { isEditable } = useReactNodeView()
const Tag = props.as || 'div'
return (
<Tag
className={props.className}
data-node-view-content=""
contentEditable={isEditable}
style={{ whiteSpace: 'pre-wrap' }}
/>
)