Do you want to:
In the case of multi person collaboration, AddBookMark cannot be added successfully, and the single person mode has no such problem
Document Server version: 7.1
Type of installation of the Document Server (docker, deb/rpm, exe)
OS:docker
Browser version:chrome 107
Hello @wangbaihuai
It is not really clear what do you mean by “cannot be added successfully”. You cannot add it to the list or there is a problem with menu or something else? Please provide a detailed description of the problem.
Also, you are using an outdated version of ONLYOFFICE Docs so please consider updating it to the actual version 7.2.1.
It is invalid to call AddBookmark during collaboration. The following code is executed in the plug-in.
No problem with single person operation.
var oDocument = Api.GetDocument();
var oRange = oDocument.GetRangeBySelect();
oRange.AddBookmark(Asc.scope.AddBookMarkData);
It is found that strict mode can be added, but fast mode cannot.
Could you specify the method used in your plug-in to execute macros to add a bookmark?
You can share whole plugin script with me via PM so we can check out the situation.
Sorry, I haven’t used PM before. Where can I upload my code
I have tested version 7.2.1 without this problem, but our project has already used version 7.1.1
So the plugin works fine in both modes on the actual version if I understood you correctly.
In this case there is no need to send me the code.
Version 7.1.1 is faulty,My code is
Asc.scope.AddBookMarkData = data.data;
this.callCommand(function () {
var oDocument = Api.GetDocument();
var oRange = oDocument.GetRangeBySelect();
oRange.AddBookmark(Asc.scope.AddBookMarkData);
console.log("AddBookmark finish.");
});
Quite simple
Unfortunately, in order to use it you have to update to the current 7.2.1 version of ONLYOFFICE Docs since we are not providing help for outdated versions.