ueberdosis/tiptap · error

[tiptap error]: Extension "${name}" provides createInRange()

Error message

[tiptap error]: Extension "${name}" provides createInRange() but does not use the "changedRanges" decoration update strategy.

What it means

Error "[tiptap error]: Extension "${name}" provides createInRange() but does not use the "changedRanges" decoration update strategy." thrown in ueberdosis/tiptap.

Source

Thrown at packages/core/src/decorations/helpers/validateDecorationSpec.ts:14

import type { DecorationSpec } from '../types.js'

/**
 * Validates a decoration spec to ensure it follows the correct pattern for its update strategy.
 * @param name The name of the extension.
 * @param spec The decoration spec to validate
 */
export function validateDecorationSpec(name: string, spec: DecorationSpec): void {
  const strategy = (spec as DecorationSpec & { update?: unknown }).update ?? 'document'

  switch (strategy) {
    case 'document':
      if (spec.createInRange) {
        throw new Error(
          `[tiptap error]: Extension "${name}" provides createInRange() but does not use the ` +
            '"changedRanges" decoration update strategy.',
        )
      }
      return
    case 'changedRanges':
      if (!spec.createInRange) {
        throw new Error(
          `[tiptap error]: Extension "${name}" uses the "changedRanges" decoration update ` +
            'strategy but does not provide createInRange().',
        )
      }
      return
    case 'manual':
      if (spec.createInRange) {
        throw new Error(
          `[tiptap error]: Extension "${name}" uses the "manual" decoration update strategy, ` +
            'which is not compatible with createInRange(). createInRange() requires the ' +

View on GitHub (pinned to 496d53afd7)

When it happens

Trigger: Thrown at packages/core/src/decorations/helpers/validateDecorationSpec.ts:14 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/e5de1ef2a1fcee29. Report an issue: GitHub.