I would like to deactivate the spell check in a Prime Faces inputTextarea
.
spellcheck="false"
is not possible in a p:inputTextarea
<p:inputTextarea value="#{mybean.cardescription}"
cols="95"
autoResize="true"
rows="20"/>
Output: Disabling Spell Check in a HTML Form: To disable spellcheck in a HTML form the spellcheck attribute is set to “false”.
Tip: To disable the spell checking in the entire form at once — just set the spellcheck="false" in the <form> tag, like this <form spellcheck="false"> .
In Textarea, Input fields or Content Editable, we can add spellcheck attribute with value true or false. spellcheck=”false”: Will NOT check Spelling Error and will NOT show a red underline when a field is in focus.
HTML spellcheck Attribute The spellcheck attribute specifies whether the element is to have its spelling and grammar checked or not. The following can be spellchecked: Text values in input elements (not password) Text in <textarea> elements.
Use following:
<h:head>
<h:outputScript name="/js/util/disableSpellCheck.js"/>
</h:head>
$('inputTextId').attr('spellcheck','false')
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