mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-30 10:29:48 +02:00
Don't call onBeforeChange when emitting new state
This commit is contained in:
@@ -202,8 +202,6 @@ class Editor extends React.Component {
|
|||||||
onChange = (state) => {
|
onChange = (state) => {
|
||||||
if (state == this.state.state) return
|
if (state == this.state.state) return
|
||||||
|
|
||||||
state = this.onBeforeChange(state)
|
|
||||||
|
|
||||||
for (const plugin of this.state.plugins) {
|
for (const plugin of this.state.plugins) {
|
||||||
if (!plugin.onChange) continue
|
if (!plugin.onChange) continue
|
||||||
const newState = plugin.onChange(state, this)
|
const newState = plugin.onChange(state, this)
|
||||||
|
Reference in New Issue
Block a user