| 1 | import { |
| 2 | NodeViewWrapper as TiptapNodeViewWrapper, |
| 3 | NodeViewWrapperProps as TiptapNodeViewWrapperProps, |
| 4 | } from "@tiptap/react"; |
| 5 | import React from "react"; |
| 6 | |
| 7 | interface NodeViewWrapperProps { |
| 8 | children: React.ReactNode; |
| 9 | } |
| 10 | |
| 11 | export const NodeViewWrapper: React.FC<NodeViewWrapperProps> = ({ |
| 12 | children, |
| 13 | }) => { |
| 14 | // Not setting this as a "p" will cause issues with foreign keyboards |
| 15 | // See https://github.com/continuedev/continue/issues/3199 |
| 16 | const nodeViewWrapperTag: TiptapNodeViewWrapperProps["as"] = "p"; |
| 17 | |
| 18 | return ( |
| 19 | <TiptapNodeViewWrapper className="my-1.5" as={nodeViewWrapperTag}> |
| 20 | {children} |
| 21 | </TiptapNodeViewWrapper> |
| 22 | ); |
| 23 | }; |