Fix annotation insertion

This commit is contained in:
Martynas Bagdonas 2021-02-17 10:38:15 +02:00 committed by Dan Stillman
parent 67f76c1445
commit d23e0e30bb

View file

@ -181,6 +181,12 @@ class EditorInstance {
if (!attachmentItem) {
continue;
}
if (!annotation.text
&& !annotation.comment
&& !annotation.image) {
continue;
}
let citationHTML = '';
let imageHTML = '';
@ -942,7 +948,7 @@ class EditorInstance {
let jsonAnnotations = [];
for (let annotation of annotations) {
let jsonAnnotation = await Zotero.Annotations.toJSON(annotation);
jsonAnnotation.itemID = attachmentItem.id;
jsonAnnotation.attachmentItemID = attachmentItem.id;
jsonAnnotations.push(jsonAnnotation);
}
let html = `<p>(${(new Date()).toLocaleString()})</p>\n`;