Commit c4ef1df3 authored by chris's avatar chris

fix

parent ad8f1467
......@@ -25,9 +25,7 @@ class ContainerEditor extends SubstanceContainerEditor {
}
didUpdate() {
console.log('first', this.spellchecker)
if (this.props.spellcheck && !this.spellchecker) {
console.log('update', this.spellchecker)
const spellCheck = new SpellCheckManager(this.context.editorSession)
spellCheck.runGlobalCheck()
this.spellchecker = true
......@@ -40,7 +38,6 @@ class ContainerEditor extends SubstanceContainerEditor {
super.didMount()
// load spellCheck
loadTypo('en_US').then(typo => {
console.log(typo)
window.typo = typo
})
......
......@@ -24,6 +24,7 @@ class SpellCheckCommand extends Command {
forEach(markers, marker => {
if (
selection.start &&
selection.start.path[0] === marker.start.path[0] &&
selection.start.offset <= marker.end.offset &&
selection.start.offset >= marker.start.offset
......
......@@ -35,12 +35,6 @@ class SpellCheckManager {
chunk(paths, '20')[0].forEach((p, index) => {
this._runSpellCheck(p)
})
setTimeout(() => {
const count = paths.length
editor.emit('displayNotification', () => {
return `${count} text blocks checked`
})
}, 2000)
}, 2000)
}
......
......@@ -17,7 +17,6 @@ function loadTypo(dicName) {
return new Promise(function(resolve, reject) {
let xhr_aff = new XMLHttpRequest()
xhr_aff.open('GET', affPath, true)
console.log(xhr_aff)
xhr_aff.onload = function() {
if (xhr_aff.readyState === 4 && xhr_aff.status === 200) {
// console.log('aff loaded')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment