refactoring, tab switching handling shouldn't be on the widget level

This commit is contained in:
zadam
2023-09-13 09:01:55 +02:00
parent 7848c7e319
commit d46801ff1f
9 changed files with 553 additions and 52 deletions

View File

@@ -377,10 +377,34 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
/**
* @method
* @returns {FNote} active note (loaded into right pane)
* @returns {FNote} active note (loaded into center pane)
*/
this.getActiveContextNote = () => appContext.tabManager.getActiveContextNote();
/**
* @method
* @returns {NoteContext} - returns active context (split)
*/
this.getActiveContext = () => appContext.tabManager.getActiveContext();
/**
* @method
* @returns {NoteContext} - returns active main context (first split in a tab, represents the tab as a whole)
*/
this.getActiveMainContext = () => appContext.tabManager.getActiveMainContext();
/**
* @method
* @returns {NoteContext[]} - returns all note contexts (splits) in all tabs
*/
this.getNoteContexts = () => appContext.tabManager.getNoteContexts();
/**
* @method
* @returns {NoteContext[]} - returns all main contexts representing tabs
*/
this.getMainNoteContexts = () => appContext.tabManager.getMainNoteContexts();
/**
* See https://ckeditor.com/docs/ckeditor5/latest/api/module_core_editor_editor-Editor.html for documentation on the returned instance.
*