How to access Chrome spell-check suggestions in JavaScript

user4985407 picture user4985407 · Jun 8, 2015 · Viewed 14.7k times · Source

How does one detect a spelling mistake inside a textarea in JavaScript? Is there an event associated with this? How do I access Chrome's spell-check suggestions for a misspelled word?

Answer

Ninjakannon picture Ninjakannon · Sep 18, 2015

How do I access Chrome's spell-check suggestions for a misspelled word?

To the best of my knowledge, you cannot. To answer more fully, I'll also mention related issues:

Is there an event associated with this?

No, nor does the contextmenu event provide anything useful for this purpose: it has no spell-check information and you cannot read the list of context menu items (which may contain spelling suggestions). The change event also doesn't provide spell-check information.

How does one detect a spelling mistake inside a textarea in JavaScript?

You can either code this yourself or use a third party library. There are other Stack Overflow questions on this topic or you can search for yourself. Related Stack Overflow questions include: