diff --git a/src/content/editor/api/events.mdx b/src/content/editor/api/events.mdx index 69451a3..04526d3 100644 --- a/src/content/editor/api/events.mdx +++ b/src/content/editor/api/events.mdx @@ -20,7 +20,7 @@ The editor fires a few different events that you can hook into. Let’s have a l | `focus` | Triggered when the editor gains focus. | | `blur` | Fired when the editor loses focus. | | `destroy` | Occurs when the editor instance is being destroyed. | -| `onPaste` | Fired when content is pasted into the editor. | +| `paste` | Fired when content is pasted into the editor. | | `onDrop` | Fired when content is dropped into the editor. | | `contentError` | The content does not match the schema. [Read more here](/editor/core-concepts/schema#invalid-schema-handling) | @@ -109,7 +109,7 @@ editor.on('destroy', () => { // The editor is being destroyed. }) -editor.on('onPaste', (event: ClipboardEvent, slice: Slice) => { +editor.on('paste', ({ event: ClipboardEvent, slice: Slice, editor: Editor }) => { // The editor is being pasted into. })