tiptap/packages/react/src/NodeViewWrapper.tsx

22 lines
388 B
TypeScript
Raw Normal View History

2021-03-14 23:30:06 +08:00
import React from 'react'
2021-03-15 03:40:40 +08:00
import { useReactNodeView } from './useReactNodeView'
2021-03-14 23:30:06 +08:00
export const NodeViewWrapper: React.FC = props => {
// TODO
2021-03-15 03:40:40 +08:00
// @ts-ignore
const { onDragStart } = useReactNodeView()
2021-03-14 23:30:06 +08:00
return (
<div
data-node-view-wrapper=""
style={{
whiteSpace: 'normal'
}}
onDragStart={onDragStart}
>
{props.children}
</div>
)
}