mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-22 23:12:52 +02:00
Remove old snapshot
parameter for Transform.apply (#361)
This commit is contained in:
committed by
Ian Storm Taylor
parent
dd6d13e33e
commit
f87e4dc72b
@@ -89,7 +89,7 @@ Transform methods can either operate on the [`Document`](./document.md), the [`S
|
|||||||
|
|
||||||
Applies all of the current transform steps, returning the newly transformed [`State`](./state.md). An `options` object is optional, containing values of:
|
Applies all of the current transform steps, returning the newly transformed [`State`](./state.md). An `options` object is optional, containing values of:
|
||||||
|
|
||||||
- `snapshot: Boolean` — override the editor's built-in logic of whether to create a new snapshot in the history, that can be reverted to later.
|
- `save: Boolean` — override the editor's built-in logic of whether to create a new snapshot in the history, that can be reverted to later.
|
||||||
|
|
||||||
|
|
||||||
## Current State Transforms
|
## Current State Transforms
|
||||||
|
@@ -128,7 +128,7 @@ class Images extends React.Component {
|
|||||||
data: {}
|
data: {}
|
||||||
})
|
})
|
||||||
.apply({
|
.apply({
|
||||||
snapshot: false
|
save: false
|
||||||
})
|
})
|
||||||
|
|
||||||
this.onChange(normalized)
|
this.onChange(normalized)
|
||||||
|
@@ -429,7 +429,7 @@ class State extends new Record(DEFAULTS) {
|
|||||||
rule.normalize(transform, document, value)
|
rule.normalize(transform, document, value)
|
||||||
}
|
}
|
||||||
|
|
||||||
return transform.apply({ snapshot: false })
|
return transform.apply({ save: false })
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user