mirror of
https://github.com/zadam/trilium.git
synced 2025-10-27 16:26:31 +01:00
current note as in note loaded into right pane is now called "active note" in frontend API
This commit is contained in:
@@ -228,15 +228,15 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null) {
|
||||
|
||||
/**
|
||||
* @method
|
||||
* @returns {string} content of currently loaded note in the editor (HTML, code etc.)
|
||||
* @returns {string} content of active note (loaded into right pane)
|
||||
*/
|
||||
this.getCurrentNoteContent = noteDetailService.getCurrentNoteContent;
|
||||
this.getActiveNoteContent = noteDetailService.getCurrentNoteContent;
|
||||
|
||||
/**
|
||||
* @method
|
||||
* @returns {NoteFull} currently loaded note in the editor (HTML, code etc.)
|
||||
* @returns {NoteFull} active note (loaded into right pane)
|
||||
*/
|
||||
this.getCurrentNote = noteDetailService.getCurrentNote;
|
||||
this.getActiveNote = noteDetailService.getCurrentNote;
|
||||
|
||||
/**
|
||||
* This method checks whether user navigated away from the note from which the scripts has been started.
|
||||
@@ -247,7 +247,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null) {
|
||||
* @method
|
||||
* @return {boolean} returns true if the original note is still loaded, false if user switched to another
|
||||
*/
|
||||
this.isNoteStillLoaded = () => {
|
||||
this.isNoteStillActive = () => {
|
||||
return this.originEntity.noteId === noteDetailService.getCurrentNoteId();
|
||||
};
|
||||
|
||||
@@ -284,7 +284,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null) {
|
||||
/**
|
||||
* @method
|
||||
*/
|
||||
this.protectCurrentNote = protectedSessionService.protectNoteAndSendToServer;
|
||||
this.protectActiveNote = protectedSessionService.protectNoteAndSendToServer;
|
||||
}
|
||||
|
||||
export default FrontendScriptApi;</code></pre>
|
||||
|
||||
Reference in New Issue
Block a user