-
Notifications
You must be signed in to change notification settings - Fork 99
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
Annotations added via Office Word JS api are not showing up when you reopen the document. #5304
Comments
Thank you for sharing the details of the issue you encountered. We have carefully reviewed your report and attempted to reproduce the problem in our environment based on the provided information. Unfortunately, we were unable to replicate the behavior you described. To help us investigate this further and identify the root cause, we kindly request a minimal code snippet that demonstrates the issue. This will greatly assist us in reproducing the problem under similar conditions. We appreciate your understanding and look forward to resolving this matter for you. Best regards, |
Hi. Sorry for the delayed response. Below is the code snippet I have created this function that adds a text in the document with annotation and saves the document (you could also save the document manually).
When the document is reopened, I run below function to attach onclick event handler
What is happening is when the document is reopened, text on which annotation was added doesn't appear as annotation i.e. underline style is missing from the text and also when you click on the text onclickhandler doesn't get triggerred. Note: During the session when the annotation was added and when you click it, the corresponding event handler was getting called. |
Confirmed with the expert that this is the expected behavior. Annotations are not persisted becaused they are only meant to provide visual indications, they are not part of the document. Thanks, |
I have created an Word add-in that allows user to add a text with annotation in the current document. There is also a click handler defined to handle annotation click event. When the text with annotation is added they appear and work fine (like the clicks are triggered). But when you save the document (either manually or using context.document.save) and reopen it, you just see the text that was added and not the annotation.
Your Environment
Expected behavior
Annotations must be saved within the document and when the document is opened, annotations be displayed. When add-in is loaded, the click event on annotations should call the click event handler defined in the add-in.
Current behavior
Annotations are not displayed. I also checked the document.xml (after saving the docx as zip file and extracting it) and there is no references to the annotations that were added.
Steps to reproduce
Link to live example(s)
None
Provide additional details
None
Context
We are trying to build a citation viewer functionality using add-in. When citation (annotation in word api terms) is clicked, we will load the pdf in side panel.
Useful logs
None
Thank you for taking the time to report an issue. Our triage team will respond to you in less than 72 hours. Normally, response time is <10 hours Monday through Friday. We do not triage on weekends.
The text was updated successfully, but these errors were encountered: