@annotation-studio/plugin-resource-editor

1.0.0-rc.35 • Public • Published

Annotation Studio - Resource editor plugin

This is the Open Seadragon or static image viewer component.

Usage

To use the plugin you need to add it as a dependency along with the core plugin:

$ npm i @annotation-studio/plugin-resource-editor @annotation-studio/plugin-core --save-dev

Note: you will probably want a viewer plugin too

Then in your code (ES6 in this example)

import CorePlugin from '@annotation-studio/plugin-core';
import ResourceEditor from '@annotation-studio/plugin-resource-editor';

// We need the core plugin.
const core = CorePlugin(
  document.getElementById('myContainer'),
  {
    resourceTemplates: '...',
    manifest: '...',
    canvas: '...',
    elucidateServer: '...',
  }
);

// We need to wait for the store to be available.
core.then(store => {
  ResourceEditor(
    document.getElementById('editor'),
    {
      canvas: {/* ... */}, // IIIF Canvas as JS object
    },
    store
  );
});

/@annotation-studio/plugin-resource-editor/

    Package Sidebar

    Install

    npm i @annotation-studio/plugin-resource-editor

    Weekly Downloads

    1

    Version

    1.0.0-rc.35

    License

    MIT

    Unpacked Size

    140 kB

    Total Files

    46

    Last publish

    Collaborators

    • stephenwf