Skip to main content
Participating Frequently
May 17, 2023
Question

Captivate Simulation: Disable Browser Spell Check

  • May 17, 2023
  • 1 reply
  • 273 views

Hi Community, 

 

I got a HTML 5 simulation that I created with the latest Captivate (2019). Everything works as expected. 

I have several TEBs throughout the simulation and I noticed that the various browsers used have a spell check enabled and when typing in the TEB, it puts those red lines under words and blue lines as the end because it thinks the words are misspelled (red lines) or that it is missing a period at the end (blue lines). 

 

The text that is being inputted into the TEBs are technical commands, which I don't expect browser spellcheckers to recognize. Instead of having learners disable spell checks across the many browsers they potentially will be using, is there a Captivate post-publish file I could modify to disable browser spell check from the project itself?

 

Thanks in advance. 

    This topic has been closed for replies.

    1 reply

    Lilybiri
    Legend
    May 18, 2023

    I found this JS snippet:

    document.querySelectorAll('input[type=text], textarea').forEach(field => field.spellCheck = false);

    Beware: I didn't test it out, but you could launch this script with an event occurring before the first TEB.

    Participating Frequently
    May 24, 2023

    Thanks Lilybiri. I tested it out but it did not work for me. That link you posted seems to also provide a HTML variant of this, but that would suggest identifying post publish files to update, which I don't mind doing, but I could not find much on which file(s) would need to be updated. I'll keep playing around with this and if I find a solution, I will share with the community. Thanks again!