openannotation / annotator

Annotation tools for the web. Select text, images, or (nearly) anything else, and add your notes.
http://annotatorjs.org
Other
2.7k stars 532 forks source link

Is it possible to remove loaded annotations in 2. #704

Closed ECannon closed 5 years ago

ECannon commented 5 years ago

HI, I am trying to remove annotations from the page dynamically, is this possible with this library?, I have tried destroy() but this stops me from creating new annotations as it destroys everything.

tilgovi commented 5 years ago

The App instance should have an annotations property that refers to the configured storage adapter. You can delete through that:

app.annotations.delete(annotation);