You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cudr_slate-collaborative/packages/client/src/onChange.ts

12 lines
244 B

import { ExtendedEditor } from './model'
const onChange = opts => (editor: ExtendedEditor, next: () => void) => {
if (!editor.remote) {
editor.connection.receiveSlateOps(editor.operations)
}
return next()
}
export default onChange