{"record":{"id":"da2af1208a37a939","repo":"ueberdosis/tiptap","slug":"usetiptap-must-be-used-within-a-tiptap-provider","errorCode":null,"errorMessage":"useTiptap must be used within a <Tiptap> provider","messagePattern":"useTiptap must be used within a <Tiptap> provider","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/react/src/Tiptap.tsx","lineNumber":27,"sourceCode":" * The shape of the React context used by the `<Tiptap />` components.\n *\n * The editor instance is always available when using the default `useEditor`\n * configuration. For SSR scenarios where `immediatelyRender: false` is used,\n * consider using the legacy `EditorProvider` pattern instead.\n */\nexport type TiptapContextType = {\n  /** The Tiptap editor instance. */\n  editor: Editor\n}\n\n/**\n * React context that stores the current editor instance.\n *\n * Use `useTiptap()` to read from this context in child components.\n */\nexport const TiptapContext = createContext<TiptapContextType>({\n  get editor(): Editor {\n    throw new Error('useTiptap must be used within a <Tiptap> provider')\n  },\n})\n\nTiptapContext.displayName = 'TiptapContext'\n\n/**\n * Hook to read the Tiptap context and access the editor instance.\n *\n * This is a small convenience wrapper around `useContext(TiptapContext)`.\n * The editor is always available when used within a `<Tiptap>` provider.\n *\n * @returns The current `TiptapContextType` value from the provider.\n *\n * @example\n * ```tsx\n * import { useTiptap } from '@tiptap/react'\n *\n * function Toolbar() {","sourceCodeStart":9,"sourceCodeEnd":45,"githubUrl":"https://github.com/ueberdosis/tiptap/blob/496d53afd7e4e3c7424b4749adeff4f45e27ddb0/packages/react/src/Tiptap.tsx#L9-L45","documentation":"Error \"useTiptap must be used within a <Tiptap> provider\" thrown in ueberdosis/tiptap.","triggerScenarios":"Thrown at packages/react/src/Tiptap.tsx:27 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"496d53afd7e4e3c7424b4749adeff4f45e27ddb0","analyzedAt":"2026-08-26T22:41:43.400Z","schemaVersion":2},"datasetVersion":"2026-08-27T03:17:27.898Z"}