electron-173: enabled spell checker

This commit is contained in:
Vishwas Shashidhar 2017-10-06 09:28:12 +05:30
parent 860e9f2f73
commit 0de7f8faad
2 changed files with 17 additions and 16 deletions

View File

@ -26,26 +26,26 @@ require('../downloadManager');
// so loading the spellchecker in try catch so that we don't
// block other method from loading
document.addEventListener('DOMContentLoaded', () => {
//loadSpellChecker();
loadSpellChecker();
});
/**
* Loads up the spell checker module
*/
// function loadSpellChecker() {
// try {
// /* eslint-disable global-require */
// const SpellCheckerHelper = require('../spellChecker').SpellCheckHelper;
// /* eslint-enable global-require */
// // Method to initialize spell checker
// const spellChecker = new SpellCheckerHelper();
// spellChecker.initializeSpellChecker();
// } catch (err) {
// /* eslint-disable no-console */
// console.error('unable to load the spell checker module, hence, skipping the spell check feature ' + err);
// /* eslint-enable no-console */
// }
// }
function loadSpellChecker() {
try {
/* eslint-disable global-require */
const SpellCheckerHelper = require('../spellChecker').SpellCheckHelper;
/* eslint-enable global-require */
// Method to initialize spell checker
const spellChecker = new SpellCheckerHelper();
spellChecker.initializeSpellChecker();
} catch (err) {
/* eslint-disable no-console */
console.error('unable to load the spell checker module, hence, skipping the spell check feature ' + err);
/* eslint-enable no-console */
}
}
// hold ref so doesn't get GC'ed
const local = {

View File

@ -98,7 +98,8 @@
"async.mapseries": "^0.5.2",
"auto-launch": "^5.0.1",
"electron-dl": "^1.9.0",
"electron-log": "^2.2.7",
"electron-log": "^2.2.7",
"electron-spellchecker": "^1.1.2",
"electron-squirrel-startup": "^1.0.0",
"filesize": "^3.5.10",
"keymirror": "0.1.1",