0

I am trying to make a search bar in my website which searches for a certain sentence in the database, I want to be able to correct the spelling of the form input before submitting it. I've noticed that there's a red squiggly line when there's a misspelled word in the input and when you right click it show's suggestions. Is there any API to access these suggestions? I've tried different javascript libraries and none of them have accurate suggestions.

macropod
  • 12,757
  • 2
  • 9
  • 21
  • `I want to be able to correct the spelling of the form input before submitting it` - not a good idea - what if the user wants to search for a misspelled word – Bravo Jul 02 '22 at 01:22
  • @Bravo thanks for the warning, I could show something like `Showing results for ----` – Axazexz player Jul 02 '22 at 01:32
  • not really a warning, just pointing out a possible flaw in your logic :p – Bravo Jul 02 '22 at 01:34

1 Answers1

1

It appears that there isn't a way. You have to either make a spellchecker yourself of use a library.

I found this stack overflow answer: https://stackoverflow.com/a/32657649/15920018

To the best of my knowledge, you cannot.

Gavin Morrow
  • 711
  • 1
  • 6
  • 19