Commit c3210d13 authored by chris's avatar chris

disable spellCheck

parent c4ef1df3
......@@ -25,21 +25,23 @@ class ContainerEditor extends SubstanceContainerEditor {
}
didUpdate() {
if (this.props.spellcheck && !this.spellchecker) {
loadTypo('en_US').then(typo => {
window.typo = typo
})
const spellCheck = new SpellCheckManager(this.context.editorSession)
spellCheck.runGlobalCheck()
this.spellchecker = true
} else {
// this.spellchecker = false
} else if (!this.props.spellcheck) {
if (window.typo) window.typo = null
this.spellchecker = false
}
}
didMount() {
super.didMount()
// load spellCheck
loadTypo('en_US').then(typo => {
window.typo = typo
})
if (this.isEmpty() && this.props.editing === 'full') {
this.createText()
......
......@@ -39,7 +39,7 @@ class SpellCheckManager {
}
_onDocumentChange(change, info) {
if (info.spellcheck) return
if (!window.typo) return
const textProperties = this.textPropertyManager._textProperties
if (!change.updated) return
Object.keys(change.updated).forEach(pathStr => {
......
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