[annotator-dev] running annotator on text within Ember JS
a3gndu at yahoo.com
Sun Feb 16 20:18:42 UTC 2014
Problem statement: I'd like to run annotator on text that is shown within Ember views.
The Ember code sends the user's search query to a server, fetches search results and displays them (multiple fields per document).
I'd like to add this functionality: the user annotates the search results (per field per document), they get saved in the backend, and when the annotated documents are found as part of a new search, the annotations are also retrieved and shown.
(Eventually, I'd like the annotations to be saved in the same server where the search is run - topic for another thread another time.)
The Ember code creates a <ul> list of documents yielded by the search and applies custom views to each.
Here's my approach: bind a new 'id' (= document number) to each list item, call annotator on it and save the id as custom 'user' data in each annotation (per field per document per user). When the user does a new search (with different keywords e.g.) and finds the same documents, the annotator fetches the stored annotations based on custom user data.
My first hurdle: a naïve attempt to attach annotator to a list item by 'id' or 'class' does not work.
How do I override/work with Ember?
I'm starting to read Ember syntax and documentation, but perhaps someone has run into this before. Speaking of which, are the dev-list email archives searchable?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the annotator-dev