diff --git a/packages/core/src/Extension.ts b/packages/core/src/Extension.ts index a4f98853c..127a0c823 100644 --- a/packages/core/src/Extension.ts +++ b/packages/core/src/Extension.ts @@ -345,6 +345,27 @@ declare module '@tiptap/core' { ) => void) | null + /** + * A node has been removed from the document. + */ + onNodeRemoved?: + | (( + this: { + name: string + options: Options + storage: Storage + editor: Editor + parent: ParentConfig>['onNodeRemoved'] + }, + props: { + editor: Editor + transaction: Transaction + node: Node + range: { from: number; to: number } + }, + ) => void) + | null + /** * The editor is focused. */