added onNodeRemoved to extensions

This commit is contained in:
Dominik Biedebach 2024-10-11 09:56:08 +02:00
parent f5504ed9d8
commit 894b74bfae

View File

@ -345,6 +345,27 @@ declare module '@tiptap/core' {
) => void) ) => void)
| null | null
/**
* A node has been removed from the document.
*/
onNodeRemoved?:
| ((
this: {
name: string
options: Options
storage: Storage
editor: Editor
parent: ParentConfig<ExtensionConfig<Options, Storage>>['onNodeRemoved']
},
props: {
editor: Editor
transaction: Transaction
node: Node
range: { from: number; to: number }
},
) => void)
| null
/** /**
* The editor is focused. * The editor is focused.
*/ */