Seeking assistance with incorporating annotations into my website using annotator.js. I have been encountering difficulties getting it up and running successfully.
My goal is to display highlighted annotations upon page load, but I keep receiving a JavaScript error message stating that ".slice is not a function." Despite numerous attempts to modify the JSON object, I have not been able to resolve this issue.
I have thoroughly reviewed the documentation provided by annotator.js, yet still have not been able to make any progress in loading annotations on my site.
Here is what I currently have implemented:
<div id="annon">
Lorem ipsum
</div>
<script>
var annotator = $('#annon').annotator();
annotator.annotator('loadAnnotations',
{"rows":
[{
"quote": "Lorem",
"ranges":
[{
"endOffset": 5,
"startOffset": 0,
"end": "/",
"start": "/"
}],
"text": "Lorem", "id": 1
}],
"total": 1}
</script>