import * as React from "react" import { isNumber, NodeViewProps, NodeViewWrapper } from "@tiptap/react" import { useImageLoad } from "../../../hooks/use-image-load" import { cn } from "@/lib/utils" const ImageViewBlock = ({ editor, node, getPos }: NodeViewProps) => { const imgSize = useImageLoad(node.attrs.src) const paddingBottom = React.useMemo(() => { if (!imgSize.width || !imgSize.height) { return 0 } return (imgSize.height / imgSize.width) * 100 }, [imgSize.width, imgSize.height]) return (
{node.attrs.alt}
) } export { ImageViewBlock }