mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-01-18 14:13:21 +08:00
use replaceWith instead of replaceRangeWith in insertContentAt
This commit is contained in:
parent
9320eaf05f
commit
71740687f4
@ -22,8 +22,9 @@ export const insertContentAt: RawCommands['insertContentAt'] = (range, value) =>
|
||||
if (dispatch) {
|
||||
const content = createNodeFromContent(value, editor.schema)
|
||||
|
||||
// @ts-ignore
|
||||
tr.replaceRangeWith(range.from, range.to, content)
|
||||
tr.replaceWith(range.from, range.to, content)
|
||||
|
||||
// set cursor at end of inserted content
|
||||
selectionToInsertionEnd(tr, tr.steps.length - 1, 1)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user