ueberdosis/tiptap · error
[tiptap warn]: Currently "setNode()" only supports text bloc
Error message
[tiptap warn]: Currently "setNode()" only supports text block nodes.
What it means
Error "[tiptap warn]: Currently "setNode()" only supports text block nodes." thrown in ueberdosis/tiptap.
Source
Thrown at packages/core/src/commands/setNode.ts:35
}
}
}
export const setNode: RawCommands['setNode'] =
(typeOrName, attributes = {}) =>
({ state, dispatch, chain }) => {
const type = getNodeType(typeOrName, state.schema)
let attributesToCopy: Record<string, any> | undefined
if (state.selection.$anchor.sameParent(state.selection.$head)) {
// only copy attributes if the selection is pointing to a node of the same type
attributesToCopy = state.selection.$anchor.parent.attrs
}
// TODO: use a fallback like insertContent?
if (!type.isTextblock) {
console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.')
return false
}
return (
chain()
// try to convert node to default node if needed
.command(({ commands }) => {
const canSetBlock = setBlockType(type, { ...attributesToCopy, ...attributes })(state)
if (canSetBlock) {
return true
}
return commands.clearNodes()
})
.command(({ state: updatedState }) => {
return setBlockType(type, { ...attributesToCopy, ...attributes })(updatedState, dispatch)View on GitHub (pinned to 496d53afd7)
When it happens
Trigger: Thrown at packages/core/src/commands/setNode.ts:35 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/2a7e434c84fe2fba.
Report an issue: GitHub.