diff --git a/chrome/content/zotero/xpcom/annotations.js b/chrome/content/zotero/xpcom/annotations.js index e5b0137f85..92ec4bd0b6 100644 --- a/chrome/content/zotero/xpcom/annotations.js +++ b/chrome/content/zotero/xpcom/annotations.js @@ -33,6 +33,7 @@ Zotero.Annotations = new function () { Zotero.defineProperty(this, 'ANNOTATION_TYPE_IMAGE', { value: 3 }); Zotero.defineProperty(this, 'ANNOTATION_TYPE_INK', { value: 4 }); Zotero.defineProperty(this, 'ANNOTATION_TYPE_UNDERLINE', { value: 5 }); + Zotero.defineProperty(this, 'ANNOTATION_TYPE_TEXT', { value: 6 }); Zotero.defineProperty(this, 'DEFAULT_COLOR', { value: '#ffd400' }); diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index 58c10110d2..d27f07e61e 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -3802,7 +3802,7 @@ for (let name of ['type', 'authorName', 'text', 'comment', 'color', 'pageLabel', if (currentType && currentType != value) { throw new Error("Cannot change annotation type"); } - if (!['highlight', 'underline', 'note', 'image', 'ink'].includes(value)) { + if (!['highlight', 'underline', 'note', 'text', 'image', 'ink'].includes(value)) { let e = new Error(`Unknown annotation type '${value}'`); e.name = "ZoteroInvalidDataError"; throw e; diff --git a/chrome/content/zotero/xpcom/data/items.js b/chrome/content/zotero/xpcom/data/items.js index dae9fb4f22..3bb182f96b 100644 --- a/chrome/content/zotero/xpcom/data/items.js +++ b/chrome/content/zotero/xpcom/data/items.js @@ -532,6 +532,10 @@ Zotero.Items = function() { case Zotero.Annotations.ANNOTATION_TYPE_NOTE: type = 'note'; break; + + case Zotero.Annotations.ANNOTATION_TYPE_TEXT: + type = 'text'; + break; case Zotero.Annotations.ANNOTATION_TYPE_IMAGE: type = 'image';