mirror of
https://github.com/zotero/zotero.git
synced 2026-10-03 02:21:49 +00:00
Add missing schema version container
This commit is contained in:
parent
a7b7f5f8b4
commit
8755cf7338
1 changed files with 4 additions and 0 deletions
|
|
@ -35,6 +35,9 @@ const DOWNLOADED_IMAGE_TYPE = [
|
|||
'image/png'
|
||||
];
|
||||
|
||||
// Schema version here has to be the same as in note-editor!
|
||||
const SCHEMA_VERSION = 1;
|
||||
|
||||
class EditorInstance {
|
||||
constructor() {
|
||||
this.instanceID = Zotero.Utilities.randomString();
|
||||
|
|
@ -1007,6 +1010,7 @@ class EditorInstance {
|
|||
}
|
||||
let html = `<h1>${Zotero.getString('note.annotationsWithDate', new Date().toLocaleString())}</h1>\n`;
|
||||
html += await editorInstance._serializeAnnotations(jsonAnnotations);
|
||||
html = `<div data-schema-version="${SCHEMA_VERSION}">${html}</div>`;
|
||||
note.setNote(html);
|
||||
await note.saveTx();
|
||||
return note;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue