Reputation: 835
What is the best way to add spell check (with custom suggestion menu) to react app? For example to textarea
element. I know that it's possible with the server-side and with vanilla javascript. So what's the best way? Maybe you have some solutions?
Upvotes: 3
Views: 17400
Reputation: 74
Here , the spellcheck attribute is true, so it will give the red underline if we write something wrong in content.
To remove that we can set the spellcheck attribute to be "false". instead of
<h1 className="heading" contentEditable="true" spellCheck="true">Hello</h1>
we can make it
<h1 className="heading" contentEditable="true" spellCheck="false">Hello</h1>
Upvotes: 0
Reputation: 644
Take a look at docs: Official React Docs.
If for basic html/vanillajs
you would use a textarea like:
<textarea spellcheck="true" />
In React
, you would use:
<textarea spellCheck="true" />
Upvotes: 5