Preview: NodeViewContent.tsx
Size: 546 B
/proc/thread-self/root/home/byroehnu/.trash/node_modules11/@tiptap/react/src/NodeViewContent.tsx
import React from 'react'
import { useReactNodeView } from './useReactNodeView.js'
export interface NodeViewContentProps {
[key: string]: any,
as?: React.ElementType,
}
export const NodeViewContent: React.FC<NodeViewContentProps> = props => {
const Tag = props.as || 'div'
const { nodeViewContentRef } = useReactNodeView()
return (
// @ts-ignore
<Tag
{...props}
ref={nodeViewContentRef}
data-node-view-content=""
style={{
whiteSpace: 'pre-wrap',
...props.style,
}}
/>
)
}
Directory Contents
Dirs: 0 × Files: 14