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:
parent
2543a695e8
commit
ebc53a2bbc
8 changed files with 175 additions and 57 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue