ueberdosis/tiptap · error · Error

[tiptap][markdown]: The `contentType` option is set to "mark

Error message

[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.

What it means

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.

Source

Thrown at packages/markdown/src/Extension.ts:211

    const assumedType = assumeContentType(
      this.editor.options.content,
      this.editor.options.contentType,
    )
    if (assumedType !== 'markdown') {
      return
    }

    if (!this.editor.markdown) {
      throw new 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.',
      )
    }

    if (
      this.editor.options.content === undefined ||
      typeof this.editor.options.content !== 'string'
    ) {
      throw new 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.',
      )
    }

    const json = this.editor.markdown.parse(this.editor.options.content as string)

    // If the parsed markdown produced no content, leave options.content
    // as-is (empty string) so that createDoc / DOMParser.parse can fill in
    // the required block node via ProseMirror's ContentMatch.fillBefore.
    if (json.content?.length) {
      this.editor.options.content = json
    }
  },
})

View on GitHub (pinned to 496d53afd7)

When it happens

Trigger: Thrown at packages/markdown/src/Extension.ts:211 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ueberdosis/tiptap@496d53afd7 (2026-08-26). Data as JSON: /api/errors/dd60429f8a0c93f4. Report an issue: GitHub.