JSPM

@ideaconsult/anno-tip

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q30355F
  • License MIT

Lightweight web annotation library built on top of Tippy.js

Package Exports

  • @ideaconsult/anno-tip

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@ideaconsult/anno-tip) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

AnnoTip - easy, flexible and fun annotation library for the web

Usage

var annoTip = new AnnoTip({
  onSelection: function (anno) {
    // anno.content = anno.selection.toUpperCase();
  },
  onAction: function (action, anno) {
    console.log("AnnoTip: onAction: " + action);
    if (action === 'edit') {
      // anno.content = anno.selection.toUpperCase();
      this.update(anno).getFrame().addClass('openned');
    }
    else
      this.discard();
  },
  onClose: function (anno) {
    console.log("AnnoTip: onClose");
  }
});

annoTip.attach(document.body);

Check the example/test page.

Here is the API for more detailed explanation of all settings.

Credits

Marker Pen icon by Icons8

No Edit icon by Icons8

Task Completed icon by Icons8

Annotator project for the test page.