Customizing the Editor

Per default, the Annotorious editor popup features two widgets:

Editor popup

You can can customize this setup when you initialize Annotorious/RecogitoJS using the widgets config option. The configuration below will give you the editor shown in the image above.

var anno = Annotorious.init({
  image: 'hallstatt',
  widgets: [
    'COMMENT',
    { widget: 'TAG', vocabulary: [ 'Animal', 'Building', 'Waterbody'] }
  ]
});

Alternatively, the configuration below will give you an editor with just a comment widget, but no tag widget.

var anno = Annotorious.init({
  image: 'hallstatt',
  widgets: [
    'COMMENT'
  ]
});

Each item in the widgets array can be one of the following:

If you want to learn how to write your own extensions for the editor, start with this guide.

Tagging Vocabularies

Note: the tag widget also supports semantic vocabularies, where each term has a label and a URI.

var anno = Annotorious.init({
  image: 'hallstatt',
  widgets: [{ 
    widget: 'TAG',
    vocabulary: [ 
      { label: 'Place', uri: 'http://www.example.com/ontology/place' },
      { label: 'Person', uri: 'http://www.example.com/ontology/person' }, 
      { label: 'Event', uri: 'http://www.example.com/ontology/event' }
    ] 
  }]
});