spell check support + small options tabs reorganization

This commit is contained in:
zadam
2019-10-06 21:35:26 +02:00
parent 3f2229d9e1
commit c1e8a4b384
26 changed files with 560 additions and 213 deletions

View File

@@ -44,9 +44,12 @@ import StandardWidget from '../widgets/standard_widget.js';
* @constructor
* @hideconstructor
*/
function FrontendScriptApi(startNote, currentNote, originEntity = null, tabContext = null) {
function FrontendScriptApi(startNote, currentNote, originEntity = null, tabContext = null, $container = null) {
const $pluginButtons = $("#plugin-buttons");
/** @property {jQuery} container of all the rendered script content */
this.$container = $container;
/** @property {object} note where script started executing */
this.startNote = startNote;
/** @property {object} note where script is currently executing */
@@ -322,7 +325,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, tabConte
* @return {boolean} returns true if the original note is still loaded, false if user switched to another
*/
this.isNoteStillActive = () => {
return this.originEntity.noteId === tabContext.noteId;
return tabContext.note && this.originEntity.noteId === tabContext.note.noteId;
};
/**