How to draw an annotation over a link without following the link

WebViewer Version: 10.3.0

Do you have an issue with a specific file(s)?
Can you reproduce using one of our samples or online demos?
Are you using the WebViewer server?
Does the issue only happen on certain browsers?
Is your issue related to a front-end framework?
Is your issue related to annotations?

Please give a brief summary of your issue:
Draw an annotation over a link

Please describe your issue and provide steps to reproduce it:
An annotation cannot be created over a link, as clicking on a link always triggers the link action and not the annotation creation although the annotation tool has been selected, e.g. freetext or highlight.
There is a large table in a document with a lot of links and the user wants to create a freetext annotation over one of those links, he has to create the annotation outside of the table and then move it over the link.
Or the user wants to highlight only a part of the link.
Is it possible to not follow links when a tool is selected or to temporary disable following links with a hotkey, like Alt?

Please provide a link to a minimal sample where the issue is reproducible:

1 Like

Hi there,

Thanks for contacting WebViewer forums,

Certain tools have an API called enableCreationOverAnnotation() where you can draw an annotation over another annotation:

Note that this method will still trigger a link confirmation modal but you will be able to create the annotation.

You can also use the Listable property as shown in this forum post:

There is also another method where you can use the isDisabled method:

const { documentViewer, Annotations, annotationManager, Tools } = instance.Core
const linkAnnotations = annotationManager.getAnnotationsList().filter(annot => annot instanceof Annotations.Link)
linkAnnotations.forEach(link => link.isDisabled = true)

Best regards,
Kevin Kim

1 Like

Hi Kim,

Thanks, I will provide a button to the user to disable the links using your code snippet.

1 Like