I'd like to experiment with adding and modifying annotations, but I
can't get my small brain around how to create an annotation
interactively. Does anyone have an example?
You seem to have CSS turned off.
Please don't fill out this field.
Here's a test mock-up showing editing in action:
Basically you just need to include the src/annotations-edit.js file and run the function
to create a new empty annotation in the middle of your current view. In the example I've just attached it to a key press to illustrate how it works, but of course this is not a great idea. You should add an icon somewhere to perform this.
You can then use the annotationChange event to update a database etc.
That's fantastic (and also a very fast response). Thanks!