0.1.0-next.ca5ce0ab • Published 6 years ago

narrative-editor-annotation-studio v0.1.0-next.ca5ce0ab

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

Annotation studio

A wrapper around the annotation studio for the narrative editor. Provides its own prop-interface for editing annotations. It will use the 2 related plugins to extend functionality beyond the vanilla annotation studio.

Usage

<AnnotationStudio
  manifestId=""
  manifestJson={{ /* ... */ }}
  canvas="http://.."
  onCreateAnnotation={(annotation, index) => (/* ... */)}
  onDeleteAnnotation={(annotation, index) => (/* ... */)}
  onUpdateAnnotation={(annotation, index) => (/* ... */)}
  onUpdateAnnotationOrder={newOrder => {/* ... */}}
/>

The annotation studio should be a controlled input. The manifestJson passed in will not be re-evaluated unless the manifestId changes. Annotation studio component will update its own internal state of the annotation lists. This might change if problems come up.

This will also include plugins for annotation studio:

  • Import manifest
  • Export manifest

They could be their own modules, or part of the same.