Add collectionID option to EditorInstance.createNoteFromAnnotations()

For adding a standalone note to the current collection
This commit is contained in:
Dan Stillman 2022-09-02 01:43:44 +02:00
parent 39e45221b1
commit e81b43be98
5 changed files with 28 additions and 11 deletions

View file

@ -608,7 +608,7 @@ describe("Zotero.Items", function () {
await item2.saveTx();
let attachment2 = await importPDFAttachment(item2);
let annotation2 = await createAnnotation('highlight', attachment2);
let annotation2Note = await Zotero.EditorInstance.createNoteFromAnnotations([annotation2], item2.id);
let annotation2Note = await Zotero.EditorInstance.createNoteFromAnnotations([annotation2], { parentID: item2.id });
assert.include(annotation2Note.getNote(), attachment2.key);
@ -651,7 +651,7 @@ describe("Zotero.Items", function () {
for (let filename of attachmentFilenames) {
let attachment = await importFileAttachment(filename, { parentID: item2.id });
let annotation = await createAnnotation('highlight', attachment);
let note = await Zotero.EditorInstance.createNoteFromAnnotations([annotation], item2.id);
let note = await Zotero.EditorInstance.createNoteFromAnnotations([annotation], { parentID: item2.id });
attachments2.push(attachment);
annotations2.push(annotation);
notes2.push(note);