Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.
This repository was archived by the owner on Jan 5, 2026. It is now read-only.

no highlight after a successful "create" #1

@aleray

Description

@aleray

Hi,

I'm trying to use your code with couchdb (not pouchdb). But for some reason it does not trigger any highlight not the "annotationCreated" hook.

I suspect this is because your/couchdb api implementation does not follow the standard annotator (2.x) API and returns {"ok":true,"id":"xxx","rev":"xxx"} instead of the document itself.

If I change annotator http storage code from:

HttpStorage.prototype.create = function (annotation) { 
    return this._apiRequest('create', annotation);
};

to:

HttpStorage.prototype.create = function (annotation) { 
    this._apiRequest('create', annotation);
    return annotation;
};

then it works.

What do you think? What is the best way to solve this?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions