Get initial Sync ID from protyle

Related to issue #9
This commit is contained in:
MassiveBox 2025-04-17 15:16:07 +02:00
parent fe32505873
commit 7e4da82b82
Signed by: massivebox
GPG key ID: 9B74D3A59181947D
3 changed files with 63 additions and 38 deletions

View file

@ -34,7 +34,7 @@ export default class DrawJSPlugin extends Plugin {
const fileID = generateRandomString();
const syncID = generateTimeString() + '-' + generateRandomString();
protyle.insert(getMarkdownBlock(fileID, syncID), true, false);
new EditorManager(new PluginEditor(fileID, syncID)).open(this)
new EditorManager(new PluginEditor(fileID)).open(this);
}
}];
@ -46,7 +46,7 @@ export default class DrawJSPlugin extends Plugin {
label: "Edit with js-draw",
click: () => {
void this.analytics.sendEvent('edit');
new EditorManager(new PluginEditor(ids.fileID, ids.syncID)).open(this)
new EditorManager(new PluginEditor(ids.fileID)).open(this)
}
})
})