Somehow I realized that since im using Emojionearea, autocapitalize was not working. So it’s my own fault for not initializing Emojionearea with autocapitalize.
I apologize for leaving this detail behind. Maybe this question will help others that are also using Emojionearea.
Correct code should be:
<div id='textField' contenteditable="true" ></div>
If you’re looking for a HTML/CSS answer, the Autocapitalise global attribute is what you want. Setting Autocapitalise to either “on” or “sentences” will capitalize the first letter of each sentence.
Here is an example:
<input type="text" autocapitalise="on" />
I have a contenteditable div where users can post comments:
However, when you type in this field on a mobile phone, it does not autocapitalize the first letter after a sentence.
On mobile, it should capitalize the first letter after each sentence ends. So:
“This is a sentence. Now, the word ‘now’ should be capitalized”
I know that this may only be a feature for input fields, but is there a way to achieve/hack this on a contenteditable element?