Textarea spellcheck attribute XHTML Strict
Asked Answered
P

2

5

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?

Prepare answered 18/12, 2009 at 22:54 Comment(0)
M
7

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.

Menke answered 18/12, 2009 at 22:54 Comment(0)
W
1
 $("#id").attr("spellcheck",false);
 $("#id").attr("spellcheck",true);
Wabash answered 18/12, 2009 at 22:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.