We have become accustomed to, or perhaps reliant on spell checkers in almost all tools we use to document or write. Some may argue that the spell checker makes us lazy, others will say that it makes us more efficient but we all recognize and use the familiar red squiggly lines that appear on screen as we type.
If you have text boxes or text areas in a web interface allowing a user to enter comments or other narrative, a spell checker can be a useful tool. If the quality of the text is important you may find that your users are using a word processor to author the text and then copy & paste to the text area, but with the advent of HTML5 this extra step can be eliminated.
HTML5 has a spell check attribute aptly name spellcheck that can be set to true for any input element. Simply setting this attribute to true will enable this feature. The html is as follows.
<input type=“textbox” spellcheck=”true” />
<textarea spellcheck=”true”> </textarea>
You will need the id of the text box or text area for which you want enable spell check. On the (control) record format there is an event property called onload. In this property add a line in the following format:
Below is an example.
This is how it appears at run tme.
You may then want to test the spell checker with the following:
Eye have a spelling chequer,
It came with my Pea Sea.
It plane lee marks four my revue
Miss Steaks I can knot sea.
Eye strike the quays and type a whirred
And weight four it two say
Weather eye am write oar wrong
It tells me straight a weigh.
Eye ran this poem threw it,
Your shore real glad two no.
Its vary polished in its weigh.
My chequer tolled me sew.
A chequer is a bless thing,
It freeze yew lodes of thyme.
It helps me right all stiles of righting,
And aides me when eye rime.
Each frays come posed up on my screen
Eye trussed too bee a joule.
The chequer pours o'er every word
Two cheque sum spelling rule.
Jerrold H. Zar