Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to deactivate spellcheck in p:inputTextarea Prime Faces?

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"/>
like image 887
Benusko Avatar asked Oct 22 '14 08:10

Benusko


People also ask

How to disable spell check in input html?

Output: Disabling Spell Check in a HTML Form: To disable spellcheck in a HTML form the spellcheck attribute is set to “false”.

How to turn off spell check in textarea?

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"> .

How do I get rid of the red underline in textarea?

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.

How do I spell check in HTML?

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.


1 Answers

Use following:

<h:head>
    <h:outputScript   name="/js/util/disableSpellCheck.js"/> 
</h:head>

$('inputTextId').attr('spellcheck','false')
like image 73
kinkajou Avatar answered Nov 15 '22 07:11

kinkajou