mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-15 02:59:01 +08:00
pass editor to sendable hook
This commit is contained in:
parent
a1f94056cf
commit
80144815a9
@ -69,8 +69,8 @@ export default {
|
||||
// debounce changes so we can save some bandwidth
|
||||
debounce: 250,
|
||||
// onSendable is called whenever there are changed we have to send to our server
|
||||
onSendable: data => {
|
||||
this.socket.emit('update', data)
|
||||
onSendable: ({ sendable }) => {
|
||||
this.socket.emit('update', sendable)
|
||||
},
|
||||
}),
|
||||
],
|
||||
|
@ -19,9 +19,12 @@ export default class Collaboration extends Extension {
|
||||
|
||||
if (sendable) {
|
||||
this.options.onSendable({
|
||||
version: sendable.version,
|
||||
steps: sendable.steps.map(step => step.toJSON()),
|
||||
clientID: sendable.clientID,
|
||||
editor: this.editor,
|
||||
sendable: {
|
||||
version: sendable.version,
|
||||
steps: sendable.steps.map(step => step.toJSON()),
|
||||
clientID: sendable.clientID,
|
||||
},
|
||||
})
|
||||
}
|
||||
}, this.options.debounce)
|
||||
|
Loading…
Reference in New Issue
Block a user