RecogitoJS
A JavaScript library for text annotation. Use it to add annotation functionality to a web page, or as a toolbox for building your own, completely custom annotation apps. RecogitoJS supports the W3C Web Annotation standard.
Resources
Installing
If you use npm, npm install @recogito/recogito-js
. Otherwise download the
latest release.
<script src="recogito.min.js"></script>
Using
The example below shows how to make text annotate-able with just a few lines of JavaScript.
<body>
<pre id="my-content">My text to annotate.</pre>
<script type="text/javascript">
(function() {
var r = Recogito.init({
content: document.getElementById('my-content')
});
// Add an event handler
r.on('createAnnotation', function(annotation) { /** **/ });
})();
</script>
</body>
License
BSD 3-Clause (= feel free to use this code in whatever way you wish. But keep the attribution/license file, and if this code breaks something, don't complain to us :-)