Closed vasco3 closed 5 years ago
Yep, it’s possible, but then you need to find some way to load the dictionaries indeed. You could, instead of something like require('dictionary-nl')
, use fs.readFile
in combination with something like brfs with browserify instead. Other bundlers probably have similar features.
Awesome, that helps! Dank u zeer
Asjeblieft!
I ended up loading the dictionary as js files stored in a string template.
And in the utility function I had to mimick the load
function from the woorm dictionaries
const spell = retext()
.use(retextSpell, callback => {
callback(null, {
aff: en_us_aff,
dic: en_us_dic,
});
})
.use(retextSyntaxUrls);
works perfectly 🎉
I would like to check spelling on an online editor in a web app. I see that the dictionaries use file-system. Is there a way to bypass that?