Using Annotator 2.0 with CouchDB 1.6.1 for storage thanks to Benjamin Young's annotator-couchapp.

Text can be highlighted and annotations entered. But after the editor window closes, the highlight is gone. Moving over the just-annotated text does not display a popup.

Refreshing the page reloads the annotations and then the highlights and popups appear.

If the storage include line is commented, highlights work as expected. Annotator can read those, as shown above. Just not the one it just saved...

An example index.html follows, distilled down to be as small as possible. Any advice appreciated!

--------

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>Annotator Test</title>
</head>
<body>
  <hr />
  <p>This is just a tiny little bit of text for testing.

  <script src="javascript/annotator.min.js"></script>
  <script type="text/javascript">
  var pageUri = function () {
    return {
      beforeAnnotationCreated: function (ann) {
        ann.uri = window.location.href;
      }
    };
  };
  var app = new annotator.App()
    .include(annotator.ui.main)
    .include(annotator.storage.http, {prefix: 
'http://<localip>:5984/annotator/_design/annotator/_rewrite'})
    .include(pageUri);

  app.start()
    .then(function () {
      app.annotations.load({uri: window.location.href});
    });
  </script>

</body></html>
_______________________________________________
annotator-dev mailing list
annotator-dev@lists.okfn.org
https://lists.okfn.org/mailman/listinfo/annotator-dev
Unsubscribe: https://lists.okfn.org/mailman/options/annotator-dev

Reply via email to