-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Excuse me, when I use the Office API and the AddCommint() method under oRange, the selected range will be lost; #2897
Comments
const aSearchs = oDocument.Search(content); |
Hi, @qzzhujixue!
Could you text a little more details about what you need to do or attach whole script? |
|
There may be a problem when the content I selected ends with 'is Tom'; Because my requirement is to annotate the content within the selected range, not the entire text |
Hi, @qzzhujixue! var oDocument = Api.GetDocument();
var oParagraph = oDocument.GetElement(0);
oParagraph.AddText('My name is Tom Riddle');
var oRange1 = oParagraph.GetRange(0, 14);
oRange1.Select();
var aSearch = oDocument.Search("is tom");
aSearch[0].AddComment("comment", "John Smith", "uid-1"); And the range is highlighted correctly Could you record a video demonstrating the issue? |
This issue was closed due no response. |
This issue is unique.
Operating System of DocumentServer
Docker
Version information
8.1
Expected Behavior
Excuse me, when I use the Office API and the AddCommint() method under oRange, the selected range will be lost; For example, in the following text, I want to match the string "is Tom". If it ends with "is Tom", "is Tom" will lose its selection, but "is Tom" is not the end, so there is no problem
Actual Behavior
"is Tom" will lose its selection, but "is Tom" is not the end, so there is no problem
Reproduction Steps
No response
Additional information
The text was updated successfully, but these errors were encountered: