Hello! I've checked the Issue https://github.com/scrumpy/tiptap/issues/230 where they explained how to append text to current position with
const transaction = this.editor.state.tr.insertText("hey!");
this.editor.view.dispatch(transaction);
I want to append text dynamically to the end of the document, and without moving the user cursor. Should it be a transaction also? How should I target the end of the document and add the transaction there?
Thanks!
const { size } = this.editor.view.state.doc.content
const transaction = this.editor.state.tr.insertText('hey!', size )
this.editor.view.dispatch(transaction)
That was just perfect! Thanks so much @apg-dev !!
Np. #679 held the answer.
Most helpful comment