Spellcheck toggle option

This commit is contained in:
Mo Bitar
2018-01-20 19:36:45 -06:00
parent 3bce8ec82d
commit c3bb993075
3 changed files with 13 additions and 9 deletions

View File

@@ -25,6 +25,7 @@ angular.module('app')
})
.controller('EditorCtrl', function ($sce, $timeout, authManager, $rootScope, actionsManager, syncManager, modelManager, themeManager, componentManager, storageManager) {
this.spellcheck = true;
this.componentManager = componentManager;
this.componentStack = [];
@@ -247,13 +248,6 @@ angular.module('app')
this.editingName = false;
}
this.toggleFullScreen = function() {
this.fullscreen = !this.fullscreen;
if(this.fullscreen) {
this.focusEditor(0);
}
}
this.selectedMenuItem = function($event, hide) {
if(hide) {
this.showMenu = false;
@@ -365,6 +359,7 @@ angular.module('app')
this.loadPreferences = function() {
this.monospaceFont = authManager.getUserPrefValue("monospaceFont", "monospace");
this.spellcheck = authManager.getUserPrefValue("spellcheck", true);
if(!document.getElementById("editor-content")) {
// Elements have not yet loaded due to ng-if around wrapper
@@ -406,6 +401,14 @@ angular.module('app')
this[key] = !this[key];
authManager.setUserPrefValue(key, this[key], true);
this.reloadFont();
if(key == "spellcheck") {
// Allows textarea to reload
this.noteReady = false;
$timeout(() => {
this.noteReady = true;
}, 0)
}
}

View File

@@ -15,7 +15,6 @@ class SysExtManager {
this.singletonManager.registerSingleton({content_type: "SN|Component", package_info: {identifier: extensionsIdentifier}}, (resolvedSingleton) => {
// Resolved Singleton
console.log("Resolved extensions-manager", resolvedSingleton);
var needsSync = false;
if(isDesktopApplication()) {
if(!resolvedSingleton.local_url) {