recogito / recogito-js

A JavaScript library for text annotation
BSD 3-Clause "New" or "Revised" License
363 stars 42 forks source link

getAnnotations doesn't work when annotating content in iframe #74

Closed rsimon closed 2 years ago

rsimon commented 2 years ago

When the RecogitoJS script is linked into the host page, and the annotated content is in an embedded iframe the getAnnotations method doesn't work. (It only returns relationship annotations.)

The reason is this line of code, where annotations are fetched by querying the document: https://github.com/recogito/recogito-js/blob/main/src/highlighter/Highlighter.js#L68