Hey Jonny,

The dom-anchor-* libraries are from Randall (a contributor here):

https://github.com/tilgovi?utf8=%E2%9C%93&tab=repositories&q=dom-anch&type=&language=


The intent is for Apache Annotator to use those libraries + the Web Annotation 
Data Model (and for compatibility the older, idiosyncratic JSON format from 
Annotator.js) and give developers an API for interacting with those and their 
relationship with the DOM. If you've not skimmed this page yet, you might find 
it helpful:

https://cwiki.apache.org/confluence/display/ANNO/Planning


Given that you're already down the road with Annotator.js 1.2.x, I'd love to 
hear more about your experience and use of it. I'm assuming (since it does 
this), you're depending on it for creating annotation bodies (comments, tags, 
etc) as well as the more foundational "highlighting" feature. Is that correct?


One of the things we're trying to determine right now is how much of the stack 
to provide/dictate. The current leaning is to (at least at first) ship a small 
library and let developers hook that into their own UI--and potentially 
providing some sample/demo code to show how it can be done.


The thinking is actually in hopes of avoiding the situation you're finding 
yourself in. Most customizations (like the confirm dialog) often take "direct 
hacking" of Annotator.js (though it's sometimes possible with the events/hooks 
system):

http://docs.annotatorjs.org/en/v1.2.x/hacking/plugin-development.html?highlight=event#annotator-events


There's a "annotationDeleted" event...but not a "beforeAnnotationDeleted" 
event. In 2.x there's a "permitDelete" option/callback which would do what you 
need potentially.


I'd personally love to hear more about what you all are building and how you'd 
prefer to come at the problem (as well as how you're doing it now).


Thanks again for reaching out!

Benjamin


--

http://bigbluehat.com/

http://linkedin.com/in/benjaminyoung

________________________________
From: Jonny Bradley <[email protected]>
Sent: Wednesday, February 15, 2017 9:58:56 AM
To: [email protected]
Subject: Re: Apache Annotator will be added to Tiki Wiki CMS Groupware (version 
17)

Hi Robert,

Thanks for your reply, that dom-anchor-text-quote library looks like just the 
thing! So how do we get it and the glue code into Annotator?

I'm not so familiar with this model of project, we generally put everything in 
the one place (Tiki) which keeps things simple for coders like me... :)

Thanks again,

jonny




> On 15 Feb 2017, at 14:15, Robert Knight <[email protected]> wrote:
>
> Hello Jonny,
>
>> Would it be possible to search for the nearest quoted text "near" to
> where the original range was set instead of giving up and losing the
> annotation completely?
>
> I'm not familiar with whether this functionality was ever developed for
> Annotator, but we have implemented this for the Hypothesis annotation
> service, which was originally based on Annotator [1][2]
>
> Hypothesis is a complete client and service for annotation. If you _just_
> wanted to look into changing how anchoring works in Annotator, the library
> that is used for converting DOM ranges to and from serialised quotes +
> surrounding context is available as a standalone npm package at
> https://www.npmjs.com/package/dom-anchor-text-quote .
>
> Kind Regards,
> Rob.
>
> [1] https://hypothes.is
> [2] https://github.com/hypothesis/client
>
> On Tue, Feb 14, 2017 at 8:02 PM, Jonny Bradley <[email protected]> wrote:
>
>> Hi Benjamin and all
>>
>> I'm working with Marc Laporte to integrate Annotator in Tiki for the
>> forthcoming version 17, which is due in the spring, and we have a few
>> questions...
>>
>> But firstly thanks for a great library, we manage to get about 90% of it
>> done very quickly, but you know the old saying! ;)
>>
>> We're using your latest stable release 1.2.10 and so i suspect that most
>> of these queries will have the reply "coming in v 2", but here goes...
>>
>> * Possibly an easy one: Is there a way of adding a confirm dialog on the
>> delete/destroy button? I've already deleted a few i intended to edit... or
>> even better, can we add event hooks on all events and do this ourselves?
>>
>> * The harder one is regarding ranges - when the page is edited the
>> highlight either "slips" or is lost completely, for instance when a new div
>> or paragraph, or even some words are added to the page. Would it be
>> possible to search for the nearest quoted text "near" to where the original
>> range was set instead of giving up and losing the annotation completely?
>>
>> * Assuming the answer to either or both of the above is "upgrade to 2.x"
>> do you have any idea if 2.0 will be released, or at least have a release
>> candidate within the next month or three? (as it's now written in
>> JavaScript i may be able to help with some of these things, i drink coffee
>> rather than write it ;)
>>
>> Many thanks for the work so far, and even more thanks in advance!
>>
>> jonny Bradley
>> A Tiki Dev
>>
>>
>
>
> --
> Kind Regards,
> Rob

Reply via email to