mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-02-24 01:02:31 +01:00
19 lines
313 B
JavaScript
19 lines
313 B
JavaScript
|
|
module.exports = {
|
|
setup(state) {
|
|
// Move cursor
|
|
return state.transform()
|
|
.moveTo({
|
|
anchorKey: '_cursor_',
|
|
anchorOffset: 10,
|
|
focusKey: '_cursor_',
|
|
focusOffset: 10
|
|
})
|
|
.apply()
|
|
},
|
|
|
|
run(state) {
|
|
return state.transform().splitBlock().apply()
|
|
}
|
|
}
|