Download node_modules/@tiptap/react/src/NodeViewContent.tsx from sitcod3/modul-s: direct link, hf CLI and curl.
- Browser
- Download file 743 Bytes
-
https://huggingface.co/spaces/sitcod3/modul-s/resolve/c06e4783a2be21cd7ca9fedf1ede4d4f0156ba3a/node_modules/%40tiptap/react/src/NodeViewContent.tsx
- Command line
-
hf download hf://spaces/sitcod3/modul-s@c06e4783a2be21cd7ca9fedf1ede4d4f0156ba3a/node_modules/@tiptap/react/src/NodeViewContent.tsx
-
curl -L -o NodeViewContent.tsx https://huggingface.co/spaces/sitcod3/modul-s/resolve/c06e4783a2be21cd7ca9fedf1ede4d4f0156ba3a/node_modules/%40tiptap/react/src/NodeViewContent.tsx
743 Bytes
| import type { ComponentProps } from 'react' | |
| import React from 'react' | |
| import { useReactNodeView } from './useReactNodeView.js' | |
| export type NodeViewContentProps<T extends keyof React.JSX.IntrinsicElements = 'div'> = { | |
| as?: NoInfer<T> | |
| } & ComponentProps<T> | |
| export function NodeViewContent<T extends keyof React.JSX.IntrinsicElements = 'div'>({ | |
| as: Tag = 'div' as T, | |
| ...props | |
| }: NodeViewContentProps<T>) { | |
| const { nodeViewContentRef, nodeViewContentChildren } = useReactNodeView() | |
| return ( | |
| // @ts-ignore | |
| <Tag | |
| {...props} | |
| ref={nodeViewContentRef} | |
| data-node-view-content="" | |
| style={{ | |
| whiteSpace: 'pre-wrap', | |
| ...props.style, | |
| }} | |
| > | |
| {nodeViewContentChildren} | |
| </Tag> | |
| ) | |
| } | |