{"record":{"id":"e5de1ef2a1fcee29","repo":"ueberdosis/tiptap","slug":"tiptap-error-extension-name-provides-creat","errorCode":null,"errorMessage":"[tiptap error]: Extension \"${name}\" provides createInRange() but does not use the \"changedRanges\" decoration update strategy.","messagePattern":"\\[tiptap error\\]: Extension \"(.+?)\" provides createInRange\\(\\) but does not use the \"changedRanges\" decoration update strategy\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/core/src/decorations/helpers/validateDecorationSpec.ts","lineNumber":14,"sourceCode":"import type { DecorationSpec } from '../types.js'\n\n/**\n * Validates a decoration spec to ensure it follows the correct pattern for its update strategy.\n * @param name The name of the extension.\n * @param spec The decoration spec to validate\n */\nexport function validateDecorationSpec(name: string, spec: DecorationSpec): void {\n  const strategy = (spec as DecorationSpec & { update?: unknown }).update ?? 'document'\n\n  switch (strategy) {\n    case 'document':\n      if (spec.createInRange) {\n        throw new Error(\n          `[tiptap error]: Extension \"${name}\" provides createInRange() but does not use the ` +\n            '\"changedRanges\" decoration update strategy.',\n        )\n      }\n      return\n    case 'changedRanges':\n      if (!spec.createInRange) {\n        throw new Error(\n          `[tiptap error]: Extension \"${name}\" uses the \"changedRanges\" decoration update ` +\n            'strategy but does not provide createInRange().',\n        )\n      }\n      return\n    case 'manual':\n      if (spec.createInRange) {\n        throw new Error(\n          `[tiptap error]: Extension \"${name}\" uses the \"manual\" decoration update strategy, ` +\n            'which is not compatible with createInRange(). createInRange() requires the ' +","sourceCodeStart":1,"sourceCodeEnd":32,"githubUrl":"https://github.com/ueberdosis/tiptap/blob/496d53afd7e4e3c7424b4749adeff4f45e27ddb0/packages/core/src/decorations/helpers/validateDecorationSpec.ts#L1-L32","documentation":"Error \"[tiptap error]: Extension \"${name}\" provides createInRange() but does not use the \"changedRanges\" decoration update strategy.\" thrown in ueberdosis/tiptap.","triggerScenarios":"Thrown at packages/core/src/decorations/helpers/validateDecorationSpec.ts:14 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"}