I'm inserting dynamic text into ckeditor 5 and setting the cursor position, but its not scrolling into current cursor position. below is what I tried. didn't seem to work
this.noteEditor.editorInstance.setData(editorData.replace(regExMatch, res.Result.Text.trim()));
this.noteEditor.editorInstance.model.change((writer:any) => {
writer.setSelection(writer.createPositionAt( this.noteEditor.editorInstance.model.document.getRoot(), 'end' ));
// this.noteEditor.editorInstance.editing.view.scrollToTheSelection({viewportOffset:300,alignToTop:false})
// console.log(`consult-notes.component::this.noteEditor.editorInstance - `,this.noteEditor.editorInstance);
// document.getElementById("ck-scroll").scrollIntoView();
});
Note. I just want to scroll to bottom of the ckeditor view on dynamic content addition.
stackblitz link to the issue -> https://stackblitz.com/edit/stackblitz-starters-jjjltl?file=src%2Fmain.ts
