small refactoring of search code

This commit is contained in:
zadam
2020-02-28 00:11:34 +01:00
parent 4bd298a55b
commit 2af37640d8
9 changed files with 32 additions and 27 deletions

View File

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