mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-04-20 13:22:04 +02:00
Fix insert-text benchmark
This commit is contained in:
parent
2a6fc88bfe
commit
6d88672e83
@ -3,8 +3,12 @@ module.exports = {
|
||||
setup(state) {
|
||||
// Move cursor
|
||||
return state.transform()
|
||||
.collapseToStartOf({ key: '_cursor_' })
|
||||
.moveForward(10) // Move inside the text
|
||||
.moveTo({
|
||||
anchorKey: '_cursor_',
|
||||
anchorOffset: 10,
|
||||
focusKey: '_cursor_',
|
||||
focusOffset: 10
|
||||
})
|
||||
.apply()
|
||||
},
|
||||
|
||||
|
@ -18,10 +18,10 @@ nodes:
|
||||
- type: code
|
||||
- text: '!'
|
||||
- kind: block
|
||||
key: _cursor_
|
||||
type: paragraph
|
||||
nodes:
|
||||
- kind: text
|
||||
key: _cursor_
|
||||
ranges:
|
||||
- text: 'Since it''s rich text, you can do things like turn a selection of text '
|
||||
- text: 'bold'
|
||||
|
Loading…
x
Reference in New Issue
Block a user