{"record":{"id":"dd60429f8a0c93f4","repo":"ueberdosis/tiptap","slug":"tiptap-markdown-the-contenttype-option-is-se-dd6042","errorCode":null,"errorMessage":"[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.","messagePattern":"\\[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\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/markdown/src/Extension.ts","lineNumber":211,"sourceCode":"    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.\n    if (json.content?.length) {\n      this.editor.options.content = json\n    }\n  },\n})\n","sourceCodeStart":193,"sourceCodeEnd":226,"githubUrl":"https://github.com/ueberdosis/tiptap/blob/496d53afd7e4e3c7424b4749adeff4f45e27ddb0/packages/markdown/src/Extension.ts#L193-L226","documentation":"Error \"[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.\" thrown in ueberdosis/tiptap.","triggerScenarios":"Thrown at packages/markdown/src/Extension.ts:211 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"}