mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-04-19 12:51:59 +02:00
This commit is contained in:
parent
93c34f6045
commit
1511d9f203
@ -136,7 +136,6 @@ class Images extends React.Component {
|
||||
schema={schema}
|
||||
state={this.state.state}
|
||||
onChange={this.onChange}
|
||||
onDocumentChange={this.onDocumentChange}
|
||||
onDrop={this.onDrop}
|
||||
onPaste={this.onPaste}
|
||||
/>
|
||||
|
@ -241,13 +241,12 @@ class Editor extends React.Component {
|
||||
const { tmp, props } = this
|
||||
const { stack } = this.state
|
||||
const { onChange, onDocumentChange, onSelectionChange } = props
|
||||
const { document, selection } = tmp
|
||||
|
||||
state = stack.onChange(state, this)
|
||||
onChange(state)
|
||||
if (state.document != tmp.document) onDocumentChange(state.document, state)
|
||||
if (state.selection != tmp.selection) onSelectionChange(state.selection, state)
|
||||
|
||||
this.cacheState(state)
|
||||
if (state.document != document) onDocumentChange(state.document, state)
|
||||
if (state.selection != selection) onSelectionChange(state.selection, state)
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user