fix: add scrollIntoView for insertContent
This commit is contained in:
@@ -19,6 +19,7 @@ export const insertContent: RawCommands['insertContent'] = value => ({ tr, dispa
|
||||
|
||||
if (typeof content === 'string') {
|
||||
tr.insertText(content)
|
||||
tr.scrollIntoView()
|
||||
|
||||
return true
|
||||
}
|
||||
@@ -29,6 +30,7 @@ export const insertContent: RawCommands['insertContent'] = value => ({ tr, dispa
|
||||
|
||||
tr.insert(tr.selection.anchor, content)
|
||||
selectionToInsertionEnd(tr, tr.steps.length - 1, -1)
|
||||
tr.scrollIntoView()
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user