import type { Editor } from '@tiptap/react' export const isNodeInSchema = (nodeName: string, editor: Editor | null): boolean => { if (!editor?.schema) return false return editor.schema.spec.nodes.get(nodeName) !== undefined }