{"record":{"id":"040bf93414f93d58","repo":"ueberdosis/tiptap","slug":"tiptap-markdown-the-contenttype-option-is-se","errorCode":null,"errorMessage":"[tiptap][markdown]: The `contentType` option is set to \"markdown\", but the Markdown extension is not added to the editor. Please add the Markdown extension to use this feature.","messagePattern":"\\[tiptap\\]\\[markdown\\]: The `contentType` option is set to \"markdown\", but the Markdown extension is not added to the editor\\. Please add the Markdown extension to use this feature\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/markdown/src/Extension.ts","lineNumber":202,"sourceCode":"    // add a `getMarkdown()` method to the editor\n    this.editor.getMarkdown = () => {\n      return this.storage.manager.serialize(this.editor.getJSON())\n    }\n\n    if (!this.editor.options.contentType) {\n      return\n    }\n\n    const assumedType = assumeContentType(\n      this.editor.options.content,\n      this.editor.options.contentType,\n    )\n    if (assumedType !== 'markdown') {\n      return\n    }\n\n    if (!this.editor.markdown) {\n      throw new Error(\n        '[tiptap][markdown]: The `contentType` option is set to \"markdown\", but the Markdown extension is not added to the editor. Please add the Markdown extension to use this feature.',\n      )\n    }\n\n    if (\n      this.editor.options.content === undefined ||\n      typeof this.editor.options.content !== 'string'\n    ) {\n      throw new Error(\n        '[tiptap][markdown]: The `contentType` option is set to \"markdown\", but the initial content is not a string. Please provide the initial content as a markdown string.',\n      )\n    }\n\n    const json = this.editor.markdown.parse(this.editor.options.content as string)\n\n    // If the parsed markdown produced no content, leave options.content\n    // as-is (empty string) so that createDoc / DOMParser.parse can fill in\n    // the required block node via ProseMirror's ContentMatch.fillBefore.","sourceCodeStart":184,"sourceCodeEnd":220,"githubUrl":"https://github.com/ueberdosis/tiptap/blob/496d53afd7e4e3c7424b4749adeff4f45e27ddb0/packages/markdown/src/Extension.ts#L184-L220","documentation":"Error \"[tiptap][markdown]: The `contentType` option is set to \"markdown\", but the Markdown extension is not added to the editor. Please add the Markdown extension to use this feature.\" thrown in ueberdosis/tiptap.","triggerScenarios":"Thrown at packages/markdown/src/Extension.ts:202 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"}