File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -724,8 +724,7 @@ export default class Editor {
724
724
placeholder : "← Start by entering a title here\n===\nVisit /features if you don't know what to do.\nHappy hacking :)"
725
725
} )
726
726
727
- // eslint-disable-next-line
728
- new CodeMirrorSpellChecker ( CodeMirror )
727
+ this . spellchecker = new CodeMirrorSpellChecker ( CodeMirror )
729
728
this . tableEditor = initTableEditor ( this . editor )
730
729
731
730
return this . editor
Original file line number Diff line number Diff line change @@ -77,13 +77,17 @@ class CodeMirrorSpellChecker {
77
77
}
78
78
79
79
this . typo = undefined
80
- this . setupCM ( cm , lang )
80
+ this . defineSpellCheckerMode ( cm , lang )
81
81
}
82
82
83
- setupCM ( cm , lang ) {
83
+ setDictLang ( lang ) {
84
+ findOrCreateTypoInstance ( lang ) . then ( typo => { this . typo = typo } )
85
+ }
86
+
87
+ defineSpellCheckerMode ( cm , lang ) {
84
88
cm . defineMode ( 'spell-checker' , config => {
85
89
// Load AFF/DIC data async
86
- findOrCreateTypoInstance ( lang ) . then ( typo => { this . typo = typo } )
90
+ this . setDictLang ( lang )
87
91
88
92
// Define what separates a word
89
93
const regexWord = '!"#$%&()*+,-./:;<=>?@[\\]^_`{|}~ '
You can’t perform that action at this time.
0 commit comments