EN
JavaScript - disable textarea spell check
4
points
In this article, we would like to show you how to disable textarea spell check in JavaScript.
Quick solution:
var textarea = document.querySelector('#my-textarea'); // gets textarea element by id
textarea.spellcheck = false; // disables spell check
Practical example
In this example, we disable textarea element spell check by setting spellcheck property to false value.
// ONLINE-RUNNER:browser;
<!DOCTYPE html>
<html>
<body>
<textarea id="my-textarea" rows="5" cols="30" placeholder="Type something here..."></textarea>
<script>
var textarea = document.querySelector('#my-textarea');
textarea.spellcheck = false; // disables spell check
</script>
</body>
</html>