Comments (4)
The annotations must have an id
property to delete them, according to the way the storage system is written. If you are returning annotations from your server on page load, make sure you assign each of them an id
property.
https://github.com/openannotation/annotator/blob/master/src/storage.js#L599
from annotator.
Thanks for your timely reply. When I create an annotation I am storing them in mongoDB which will automatically create an id, however this id is not being sent in the url when I click the delete (x) on the annotation. When I am creating an annotation and then storing the annotation there is also no id being sent in the request body, only quote, ranges, text and uri. I would not have the uri in the body only that I included it on the client side. Do i have to do the same with the id?
from annotator.
You need to include the id
in the body. If I remember correctly, MongoDB might add an _id
field, but you will have to format this as id
or change the storage adapter to suit your needs.
After you save an annotation, you will want to also update the new annotation by returning the annotation, with its new id
.
from annotator.
That's exactly it, thank you!
from annotator.
Related Issues (20)
- Dynamic content. How to update ranges?
- Is it possible to remove loaded annotations in 2. HOT 1
- Which search key is used? HOT 1
- Documentation for stable/1.2x missing ? HOT 3
- jQuery data is visible only in some stack frames HOT 1
- adjust the z-index
- How to save annotations with store plugin? HOT 20
- Does not display annotations in a pdf document. HOT 2
- viewer: new annotations for the same word
- Store plugin: how to send variable values in annotationData HOT 6
- Unable to console.log store pluggin output getting following error ---- Could not load Tags plugin. Have you included the appropriate <script> tag?
- Uncaught TypeError: Cannot read property 'nodeType' of undefined
- Uncaught TypeError: Cannot read property 'hide' of null
- active forks HOT 2
- Sorry, I don't know how to display the saved data to the page
- Page loading two times when i added annotations to body tag
- i cannot see highlight tags on screen when i loaded annotators (json format)
- this doesn't work. HOT 1
- why jquery is not defined >?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from annotator.