Skip to main content
September 9, 2020
Question

PDF Embed API: lock annotations

  • September 9, 2020
  • 1 reply
  • 2115 views

Is there a way to disable the "Edit" and "Delete" options on annotations not created by the current user? In other words, can I lock annotations made by other users on the PDF while allowing edit and delete options for my own annotations? So edit/delete allowed if the annotation's creator.name === user.Profile.name.

This topic has been closed for replies.

1 reply

Joel Geraci
Community Expert
Community Expert
September 9, 2020

There is no "lock" attribute but it is something that I've submitted as a feature request. However, you can immediately unselect a selected annotation if the annotation belongs to another user. I show that functionality at this CodePen. It's a simulation of a real-time collaboration environment where the left user can add annotations and they show up on the right but the right user can't delete them and neither can delete the one made by Akira Tanaka.

September 9, 2020

This sounds like a great workaround - thank you for sharing! Ideally users would be able to reply to each others annotations though, which wouldn't be possible with an unselect annotation on select of the annotation. I'll have to decide with feature is more critical for now until the lock capability hopefully exists in the future 🙂

Known Participant
September 17, 2020

I implemented this fix to directly deselect annotations once clicked, however this resulted in a problem in case of large comments. Comments are truncated with "..." and there is now no way to see the whole comment by the user.