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.
14 lines
305 B
14 lines
305 B
import { ExtendedEditor } from './model'
|
|
|
|
const onChange = opts => (editor: ExtendedEditor, next: () => void) => {
|
|
if (editor.connection && !editor.remote) {
|
|
const operations: any = editor.operations
|
|
|
|
editor.connection.receiveSlateOps(operations)
|
|
}
|
|
|
|
return next()
|
|
}
|
|
|
|
export default onChange
|