Question: I have an app that has a textbox, validation control and a button. The problem is that if someone copies text from a word document inside the textbox, some of the special characters won't be allowed because of the validation control. But if I delete those special characters and we typed them, the validation control works. Is there a way to convert that text to plain text or rich text inside the textbox?

Answer: 
This solution is quite simple and works for me:

1. Style your textarea with '**overflow:hidden**' and '**resize:none**'. This will hide the scroll
bar and stop the user from resizing the textarea themselves.
2. Set the desired dimensions of your textarea. (i.e. rows="4" cols="50")
3. Use an **input** event handler to compare the height of your text area with the height of the scroll. While the scroll is taller than your textarea remove one character from the end of your input. This loop will continue until the scroll no longer exceeds the height of the textarea (i.e there is no scrollbar and the textarea remains it's desired size).

```js
const textarea = document.querySelector('textarea');

textarea.addEventListener('input', function() {
  while (textarea.clientHeight < textarea.scrollHeight) {
    textarea.value = textarea.value.substr(0, textarea.value.length - 1);
  }
});
```

```css
textarea {
  overflow: hidden;
  resize: none;
}
```

```html
<textarea rows="2" cols="20"> </textarea>
```
Set maxlength attr to 120

Example link is here

<http://www.w3schools.com/tags/att_textarea_maxlength.asp>