ueberdosis/tiptap · error

[Tiptap Table of Contents Deprecation Notice]: The 'scrollPa

Error message

[Tiptap Table of Contents Deprecation Notice]: The 'scrollParent' option must now be provided as a callback function that returns the 'scrollParent' element. The ability to pass this option directly will be deprecated in future releases.

What it means

Error "[Tiptap Table of Contents Deprecation Notice]: The 'scrollParent' option must now be provided as a callback function that returns the 'scrollParent' element. The ability to pass this option directly will be deprecated in future releases." thrown in ueberdosis/tiptap.

Source

Thrown at packages/extension-table-of-contents/src/tableOfContents.ts:270

        onUpdate: this.options.onUpdate?.bind(this),
        getIndexFn: this.options.getIndex || getLinearIndexes,
        getLevelFn: this.options.getLevel || getHeadlineLevel,
        anchorTypes: this.options.anchorTypes,
      })
    }
  },

  onCreate() {
    // Avoid mutating the document during server-side rendering.
    if (typeof window === 'undefined' || !this.editor.view) {
      return
    }

    const { tr } = this.editor.state
    const existingIds: string[] = []

    if (this.options.scrollParent && typeof this.options.scrollParent !== 'function') {
      console.warn(
        "[Tiptap Table of Contents Deprecation Notice]: The 'scrollParent' option must now be provided as a callback function that returns the 'scrollParent' element. The ability to pass this option directly will be deprecated in future releases.",
      )
    }

    this.editor.state.doc.descendants((node, pos) => {
      const nodeId = node.attrs['data-toc-id']
      const isValidType = this.options.anchorTypes?.includes(node.type.name)

      if (!isValidType || node.textContent.length === 0) {
        return
      }

      if (nodeId === null || nodeId === undefined || existingIds.includes(nodeId)) {
        let id = ''

        if (this.options.getId) {
          id = this.options.getId(node.textContent)
        } else {

View on GitHub (pinned to 496d53afd7)

When it happens

Trigger: Thrown at packages/extension-table-of-contents/src/tableOfContents.ts:270 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/3ce2ff7ab9419d6f. Report an issue: GitHub.