I want to implement a function that when I open a docx file scroll to the specific position that I have marked with a bookmark. I implement it in frontend by using the rangApi like below
function onLabel(){
const connector = connectorRef.current!;
connector.callCommand(function () {
var oDocument = Api.GetDocument();
var oRange = oDocument.GetRangeBySelect();
oRange.AddBookmark("newBook");
}, true);
}
function onJump(){
const connector = connectorRef.current!;
connector.callCommand(function () {
var oDocument = Api.GetDocument();
var oRange = oDocument.GetBookmarkRange('newBook');
oRange.Select()
}, true);
}
How do I add bookmark by backend request ? then I can scroll to the specific position in frontend
my english is bad thank u
I try use RangeApi Select
in events_onDocumentReady but sometimes it not work,selected but not scroll the document