mirror of
https://github.com/heyman/heynote.git
synced 2025-01-23 14:28:38 +01:00
Move cursor to end of document and scroll it into view
This commit is contained in:
parent
5a4a092521
commit
570fdba08b
@ -57,7 +57,7 @@ editor.update([
|
||||
editor.state.update({
|
||||
changes:{
|
||||
from: 0,
|
||||
to: editor.state.length,
|
||||
to: editor.state.doc.length,
|
||||
insert: initialData,
|
||||
},
|
||||
annotations: heynoteEvent.of(INITIAL_DATA),
|
||||
@ -66,7 +66,8 @@ editor.update([
|
||||
|
||||
|
||||
editor.dispatch({
|
||||
selection: {anchor: 0, head: 0},
|
||||
selection: {anchor: editor.state.doc.length, head: editor.state.doc.length},
|
||||
scrollIntoView: true,
|
||||
})
|
||||
editor.focus()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user