I am building an website and I am using this autocomplete jquery I wanted the long words (words longer than the input field is, to break to the next line, or let user to brake them with ENTER key. I tried this code:
.wordwrap {
white-space: pre-wrap; /* CSS3 */
white-space: -moz-pre-wrap; /* Firefox */
white-space: -pre-wrap; /* Opera <7 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* IE */
}
but with no result, it doesent brake, it just hides, rest of the word which is longer than the input field.
The second thing I wanted is to allow only words starting with particular character. In this case I choose the letter "ch" or "Ch" I tried to make it with "pattern" parameter but it doesnt work too...
<input id="tags" pattern="ch+" required>
Here is the fiddle: https://jsfiddle.net/fm0r0dmt/
And textarea doesn't support the pattern attribute.