load ancestors and templates when receiving sync from backend

This commit is contained in:
zadam
2020-03-19 09:18:36 +01:00
parent 48c57c7ce7
commit debce78c7f
4 changed files with 107 additions and 88 deletions

View File

@@ -86,7 +86,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
await ws.waitForMaxKnownSyncId();
await appContext.tabManager.getActiveTabContext().setNote(notePath);
appContext.triggerCommand('focusAndSelectTitle');
appContext.triggerEvent('focusAndSelectTitle');
};
/**
@@ -310,7 +310,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
* @method
* @returns {NoteShort} active note (loaded into right pane)
*/
this.getActiveTabNote = appContext.tabManager.getActiveTabNote;
this.getActiveTabNote = () => appContext.tabManager.getActiveTabNote();
/**
* See https://ckeditor.com/docs/ckeditor5/latest/api/module_core_editor_editor-Editor.html for a documentation on the returned instance.
@@ -324,7 +324,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
* @method
* @returns {Promise<string|null>} returns note path of active note or null if there isn't active note
*/
this.getActiveTabNotePath = appContext.tabManager.getActiveTabNotePath;
this.getActiveTabNotePath = () => appContext.tabManager.getActiveTabNotePath();
/**
* @method