mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-04-21 22:02:05 +02:00
cleanup
This commit is contained in:
parent
ea2f70469a
commit
60a03370ec
@ -673,15 +673,11 @@ function Plugin(options = {}) {
|
||||
*/
|
||||
|
||||
function onSelect(e, data, state) {
|
||||
const { selection } = data
|
||||
|
||||
debug('onSelect', { data, selection: selection.toJS() })
|
||||
debug('onSelect', { data })
|
||||
|
||||
return state
|
||||
.transform()
|
||||
.moveTo(selection)
|
||||
// Since the document has not changed, we only need to normalize the
|
||||
// selection and this is done automatically in `transform.apply()`.
|
||||
.moveTo(data.selection)
|
||||
.apply()
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user