Skip to content

paulbennet/electron-spellchecker

 
 

Repository files navigation

Please refer original readme.md for base documentation.


Changes done in this fork

  1. Modified attachToInput api, so that you can manually initialize spellcheck event listening over a target parent dom element. This was done so that a embedded iframe's document body can also be spellchecked (some richtext-editors still use iframe).

Code sample:

// ...
let iframeDocumentBody = null;

try {
  iframeDocumentBody = document.body.querySelectorAll("iframe")[0].contentWindow.document.body;
} catch (err) {}

if (iframeDocumentBody) {
  spellcheckHandler.attachToInput(null, {
    targetElement: iframeDocumentBody
  });
}
// ...

About

Implement spellchecking, correctly

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 97.3%
  • HTML 2.7%