Fix annotation insertion
This commit is contained in:
parent
67f76c1445
commit
d23e0e30bb
1 changed files with 7 additions and 1 deletions
|
@ -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`;
|
||||
|
|
Loading…
Reference in a new issue