Spellcheck toggle option
This commit is contained in:
@@ -25,6 +25,7 @@ angular.module('app')
|
|||||||
})
|
})
|
||||||
.controller('EditorCtrl', function ($sce, $timeout, authManager, $rootScope, actionsManager, syncManager, modelManager, themeManager, componentManager, storageManager) {
|
.controller('EditorCtrl', function ($sce, $timeout, authManager, $rootScope, actionsManager, syncManager, modelManager, themeManager, componentManager, storageManager) {
|
||||||
|
|
||||||
|
this.spellcheck = true;
|
||||||
this.componentManager = componentManager;
|
this.componentManager = componentManager;
|
||||||
this.componentStack = [];
|
this.componentStack = [];
|
||||||
|
|
||||||
@@ -247,13 +248,6 @@ angular.module('app')
|
|||||||
this.editingName = false;
|
this.editingName = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.toggleFullScreen = function() {
|
|
||||||
this.fullscreen = !this.fullscreen;
|
|
||||||
if(this.fullscreen) {
|
|
||||||
this.focusEditor(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.selectedMenuItem = function($event, hide) {
|
this.selectedMenuItem = function($event, hide) {
|
||||||
if(hide) {
|
if(hide) {
|
||||||
this.showMenu = false;
|
this.showMenu = false;
|
||||||
@@ -365,6 +359,7 @@ angular.module('app')
|
|||||||
|
|
||||||
this.loadPreferences = function() {
|
this.loadPreferences = function() {
|
||||||
this.monospaceFont = authManager.getUserPrefValue("monospaceFont", "monospace");
|
this.monospaceFont = authManager.getUserPrefValue("monospaceFont", "monospace");
|
||||||
|
this.spellcheck = authManager.getUserPrefValue("spellcheck", true);
|
||||||
|
|
||||||
if(!document.getElementById("editor-content")) {
|
if(!document.getElementById("editor-content")) {
|
||||||
// Elements have not yet loaded due to ng-if around wrapper
|
// Elements have not yet loaded due to ng-if around wrapper
|
||||||
@@ -406,6 +401,14 @@ angular.module('app')
|
|||||||
this[key] = !this[key];
|
this[key] = !this[key];
|
||||||
authManager.setUserPrefValue(key, this[key], true);
|
authManager.setUserPrefValue(key, this[key], true);
|
||||||
this.reloadFont();
|
this.reloadFont();
|
||||||
|
|
||||||
|
if(key == "spellcheck") {
|
||||||
|
// Allows textarea to reload
|
||||||
|
this.noteReady = false;
|
||||||
|
$timeout(() => {
|
||||||
|
this.noteReady = true;
|
||||||
|
}, 0)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ class SysExtManager {
|
|||||||
|
|
||||||
this.singletonManager.registerSingleton({content_type: "SN|Component", package_info: {identifier: extensionsIdentifier}}, (resolvedSingleton) => {
|
this.singletonManager.registerSingleton({content_type: "SN|Component", package_info: {identifier: extensionsIdentifier}}, (resolvedSingleton) => {
|
||||||
// Resolved Singleton
|
// Resolved Singleton
|
||||||
console.log("Resolved extensions-manager", resolvedSingleton);
|
|
||||||
var needsSync = false;
|
var needsSync = false;
|
||||||
if(isDesktopApplication()) {
|
if(isDesktopApplication()) {
|
||||||
if(!resolvedSingleton.local_url) {
|
if(!resolvedSingleton.local_url) {
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
.header
|
.header
|
||||||
%h4.title Display
|
%h4.title Display
|
||||||
%menu-row{"title" => "'Monospace Font'", "circle" => "ctrl.monospaceFont ? 'success' : 'default'", "ng-click" => "ctrl.selectedMenuItem($event, true); ctrl.toggleKey('monospaceFont')"}
|
%menu-row{"title" => "'Monospace Font'", "circle" => "ctrl.monospaceFont ? 'success' : 'default'", "ng-click" => "ctrl.selectedMenuItem($event, true); ctrl.toggleKey('monospaceFont')"}
|
||||||
|
%menu-row{"title" => "'Spellcheck'", "circle" => "ctrl.spellcheck ? 'success' : 'default'", "ng-click" => "ctrl.selectedMenuItem($event, true); ctrl.toggleKey('spellcheck')"}
|
||||||
|
|
||||||
.item{"ng-click" => "ctrl.onEditorMenuClick()", "ng-class" => "{'selected' : ctrl.showEditorMenu}", "click-outside" => "ctrl.showEditorMenu = false;", "is-open" => "ctrl.showEditorMenu"}
|
.item{"ng-click" => "ctrl.onEditorMenuClick()", "ng-class" => "{'selected' : ctrl.showEditorMenu}", "click-outside" => "ctrl.showEditorMenu = false;", "is-open" => "ctrl.showEditorMenu"}
|
||||||
.label Editor
|
.label Editor
|
||||||
@@ -43,7 +44,8 @@
|
|||||||
%panel-resizer.left{"panel-id" => "'editor-content'", "on-resize-finish" => "ctrl.onPanelResizeFinish","control" => "ctrl.resizeControl", "min-width" => 300, "property" => "'left'", "hoverable" => "true"}
|
%panel-resizer.left{"panel-id" => "'editor-content'", "on-resize-finish" => "ctrl.onPanelResizeFinish","control" => "ctrl.resizeControl", "min-width" => 300, "property" => "'left'", "hoverable" => "true"}
|
||||||
%component-view.component-view{"ng-if" => "ctrl.selectedEditor", "component" => "ctrl.selectedEditor"}
|
%component-view.component-view{"ng-if" => "ctrl.selectedEditor", "component" => "ctrl.selectedEditor"}
|
||||||
%textarea.editable#note-text-editor{"ng-if" => "!ctrl.selectedEditor", "ng-model" => "ctrl.note.text",
|
%textarea.editable#note-text-editor{"ng-if" => "!ctrl.selectedEditor", "ng-model" => "ctrl.note.text",
|
||||||
"ng-change" => "ctrl.contentChanged()", "ng-trim" => "false", "ng-click" => "ctrl.clickedTextArea()", "ng-focus" => "ctrl.onContentFocus()", "dir" => "auto"}
|
"ng-change" => "ctrl.contentChanged()", "ng-trim" => "false", "ng-click" => "ctrl.clickedTextArea()",
|
||||||
|
"ng-focus" => "ctrl.onContentFocus()", "dir" => "auto", "ng-attr-spellcheck" => "{{ctrl.spellcheck}}"}
|
||||||
{{ctrl.onSystemEditorLoad()}}
|
{{ctrl.onSystemEditorLoad()}}
|
||||||
%panel-resizer{"panel-id" => "'editor-content'", "on-resize-finish" => "ctrl.onPanelResizeFinish","control" => "ctrl.resizeControl", "min-width" => 300, "hoverable" => "true"}
|
%panel-resizer{"panel-id" => "'editor-content'", "on-resize-finish" => "ctrl.onPanelResizeFinish","control" => "ctrl.resizeControl", "min-width" => 300, "hoverable" => "true"}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user