ng-annotate-text is a library to annotate texts in AngularJS.
Attribute | Default value | Description |
---|---|---|
text | The text to be annotated | |
annotations | Annotations to load | |
readonly | false | No new annotations can be made and existing annotations can't be edited |
popup-controller | Controller to apply to the popup | |
popup-template-url | Url to the popup template | |
tooltip-controller | Controller to apply to the tooltip | |
tooltip-template-url | Url to the tooltip template | |
on-annotate | Function called when an annotation is saved, with the annotation passed as the first attribute | |
on-annotate-delete | Function called when an annotation is deleted, with the annotation passed as the first attribute | |
on-annotate-error | Function called when an error is caught, with the error passed as the first attribute | |
on-popup-show | Function called when the popup is shown | |
on-popup-hide | Function called when the popup is hidden | |
popup-offset | 10 | Position the popup editor away form its annotation and the window edges by this many pixels |
Event | Description |
---|---|
ngAnnotateText.clearPopups | Clears any open popup or tooltip |
Error | Description |
---|---|
NG_ANNOTATE_TEXT_NO_TEXT_SELECTED | The user clicked the text but no text were selected |
NG_ANNOTATE_TEXT_PARTIAL_NODE_SELECTED | The selection did not start and end in the same element |
- Install NodeJS (nodejs.org)
- Install Gulp globally:
npm install -g gulp
- Fork the repo and clone it. (How to do it with GitHub.)
- Go into the project folder:
cd ng-annotate-text
- Install the project dependencies:
npm install
- Build the project files:
gulp
- Build them whenever they change:
gulp watch
To make development of ng-annotate-text easier you can check out the master
branch in one directory and the gh-pages
branch in another, then symlink the dist files from master
into the lib
directory in gh-pages
, and change the includes in index.html
to use those versions.
Chrome, Firefox, Safari and IE9+
Autoprefixer rule: last 2 versions, ie >= 9, Firefox ESR
Licensed under CC-BY-NC
https://tldrlegal.com/license/creative-commons-attribution-noncommercial-(cc-nc)
Copyright (C) 2014 DigiExam