I'm using ReactJS to render my DOM.
I want to add the spellcheck="false"
attribute on a text input, so I do this:
render() {
return (
<div>
<input type="text" placeholder="Name" spellcheck="false" />
</div>
)
}
Then, when I inspect with chrome, the spellcheck
attribute is not present.
Disable SpellCheck To disable spell check in Document Editor, set enableSpellCheck property as false or remove enableSpellCheck property initialization code. The default value of this property is false.
Spell Check feature can be enabled/disabled using an attribute called spellcheck which defines whether the HTML element will be checked for the errors or not. It takes two values, either true or false.
To disable spell check in textarea atrribute spellcheck=”false” can be used.
Try using spellCheck
instead. (Note the capital C)
The docs are good for explaining how default HTML attributes should be referenced in React.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With