Reputation: 611
I would like to turn off the built-in spellcheck functionality in certain browsers such as Firefox and Opera on a textarea that contains HTML embed code for visitors to copy and paste. This can be done with following attribute:
spellcheck="false"
However, this causes a validation error for XHTML Strict. Also, it doesn't work properly in Opera, because the spell checking returns after a user selects the embed code in the text area. Is there another method for turning off spell check functionality?
Upvotes: 5
Views: 6171
Reputation: 21
$("#id").attr("spellcheck",false);
$("#id").attr("spellcheck",true);
Upvotes: 1
Reputation: 11264
spellcheck="false"
is a part of HTML5 specification. Don't you mind changing your doctype in appropriate way?
Another idea proposed in this question is using third-party WYSIWYG editors that don't use textfield for user input.
Upvotes: 7