Coder Social home page Coder Social logo

nitinaws / ng-annotate-text Goto Github PK

View Code? Open in Web Editor NEW

This project forked from digiexam/ng-annotate-text

0.0 1.0 0.0 1.64 MB

ng-annotate-text is a library to annotate texts in AngularJS.

Home Page: http://digiexam.github.io/ng-annotate-text/

License: Other

JavaScript 7.85% CoffeeScript 62.59% CSS 29.55%

ng-annotate-text's Introduction

ng-annotate-text

ng-annotate-text is a library to annotate texts in AngularJS.

Screenshot

Demo

Try a demo of ng-annotate.

Attributes

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 listeners

Event Description
ngAnnotateText.clearPopups Clears any open popup or tooltip

Errors passed to the annotation error callback

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

Getting started with development

  1. Install NodeJS (nodejs.org)
  2. Install Gulp globally: npm install -g gulp
  3. Fork the repo and clone it. (How to do it with GitHub.)
  4. Go into the project folder: cd ng-annotate-text
  5. Install the project dependencies: npm install
  6. 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.

Browser compatability

Chrome, Firefox, Safari and IE9+

Autoprefixer rule: last 2 versions, ie >= 9, Firefox ESR

License

Licensed under CC-BY-NC

https://tldrlegal.com/license/creative-commons-attribution-noncommercial-(cc-nc)

Copyright (C) 2014 DigiExam

ng-annotate-text's People

Contributors

kennethsundqvist avatar rmilesson avatar robinwassen avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.