0.0.8 • Published 5 years ago

@paulbennetjoshua/electron-spellchecker v0.0.8

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

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
  });
}
// ...