{"record":{"id":"8b6937f21d08fcc3","repo":"ueberdosis/tiptap","slug":"tiptap-error-invalid-html-content","errorCode":null,"errorMessage":"[tiptap error]: Invalid HTML content","messagePattern":"\\[tiptap error\\]: Invalid HTML content","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/core/src/helpers/createNodeFromContent.ts","lineNumber":112,"sourceCode":"            ],\n          },\n        }),\n      })\n\n      if (options.slice) {\n        DOMParser.fromSchema(contentCheckSchema).parseSlice(\n          elementFromString(content),\n          options.parseOptions,\n        )\n      } else {\n        DOMParser.fromSchema(contentCheckSchema).parse(\n          elementFromString(content),\n          options.parseOptions,\n        )\n      }\n\n      if (options.errorOnInvalidContent && hasInvalidContent) {\n        throw new Error('[tiptap error]: Invalid HTML content', {\n          cause: new Error(`Invalid element found: ${invalidContent}`),\n        })\n      }\n    }\n\n    const parser = DOMParser.fromSchema(schema)\n\n    if (options.slice) {\n      return parser.parseSlice(elementFromString(content), options.parseOptions).content\n    }\n\n    return parser.parse(elementFromString(content), options.parseOptions)\n  }\n\n  return createNodeFromContent('', schema, options)\n}\n","sourceCodeStart":94,"sourceCodeEnd":129,"githubUrl":"https://github.com/ueberdosis/tiptap/blob/496d53afd7e4e3c7424b4749adeff4f45e27ddb0/packages/core/src/helpers/createNodeFromContent.ts#L94-L129","documentation":"Error \"[tiptap error]: Invalid HTML content\" thrown in ueberdosis/tiptap.","triggerScenarios":"Thrown at packages/core/src/helpers/createNodeFromContent.ts:112 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"}