appContext is now component

This commit is contained in:
zadam
2020-02-16 19:21:17 +01:00
parent 22c042e21f
commit e000fb4579
23 changed files with 70 additions and 103 deletions

View File

@@ -61,7 +61,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, tabConte
await ws.waitForMaxKnownSyncId();
await appContext.tabManager.getActiveTabContext().setNote(notePath);
appContext.trigger('focusAndSelectTitle');
appContext.triggerEvent('focusAndSelectTitle');
};
/**
@@ -279,7 +279,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, tabConte
* @param {string} text - this must be clear text, HTML is not supported.
* @method
*/
this.addTextToActiveTabEditor = text => appContext.trigger('addTextToActiveEditor', {text});
this.addTextToActiveTabEditor = text => appContext.triggerEvent('addTextToActiveEditor', {text});
/**
* @method
@@ -293,7 +293,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, tabConte
* @method
* @param callback - method receiving "textEditor" instance
*/
this.getActiveTabTextEditor = callback => appContext.trigger('executeInActiveEditor', {callback});
this.getActiveTabTextEditor = callback => appContext.triggerEvent('executeInActiveEditor', {callback});
/**
* @method