Do you have an issue with a specific file(s)? No
Can you reproduce using one of our samples or online demos? No
Are you using the WebViewer server? No
Does the issue only happen on certain browsers? No
Is your issue related to a front-end framework? No
Is your issue related to annotations? Yes
Please give a brief summary of your issue:
(Think of this as an email subject)
Enhance the search capability in the notes panel
Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)
We have recently implemented some customizations to create custom annotation and display some additional text in the notes panel for those custom annotations. We are storing the additional text in the XFDF in trn-custom-data by using annotation.setCustomData. (the custom text is shown in the screenshot and is in italics).
That part is working correctly.
Now, we would like the “Search Comments” input at the top of the notes panel to include this custom text when searching.
Is there a way to do that?
Or, as an alternative, is there a way to save and display style information in the preview text that normally accompanies a highlight annotation (saved in trn-custom-data → trn-annot-preview)? That text seems to be searchable. If we could style that portion of text, we could save it to the trn-annot-preview XFDF data.
Our custom annotation currently sets the trn-annot-preview data, but my attempts to save style information within that text have failed.
Hi Tyler,
Is there a way to control the search that happens in the comments panel itself? When I tried the example, it is searching the text in the document. I would like to search in the comments panel and include the preview text, comments, replies (that it already does now) as well as including some additional text that I have added into the XFDF.
Hi Tyler,
I am just getting back to this. I tried using overrideSearchFunction. The function is only getting called when I use the search that is activated by the magnifying glass here:
Apologies for sending the wrong search API, it looks like we dont have a way to insert a custom search function for the notes, so Ill add this as a feature request.