Add noteSchemaVersion, and replace item.getNote() with .note

```
var noteContents = item.note; // was item.getNote()
var schemaVersion = item.noteSchemaVersion;

item.setNote(contents) // default to Zotero.Notes.schemaVersion
item.setNote(contents, schemaVersion) - explicit version
```
This commit is contained in:
Dan Stillman 2020-08-25 13:07:14 -04:00
parent 2543a695e8
commit ebc53a2bbc
8 changed files with 175 additions and 57 deletions

View file

@ -468,7 +468,10 @@ function createUnsavedDataObject(objectType, params = {}) {
obj.setTags(params.tags);
}
if (params.note !== undefined) {
obj.setNote(params.note);
obj.setNote(params.note, params.noteSchemaVersion);
}
else if (itemType == 'note') {
obj.setNote(`<p>${Zotero.Utilities.randomString()}</p>`, params.noteSchemaVersion);
}
break;