View Full Version : Preventing user to type non-alphanumeric characters in HtmlEditor

8 Jul 2013, 7:35 PM

Can we restrict users to type only alphanumeric characters in the ExtJS HtmlEditor component? There is no vType config available in it so I am wondering if there is an alternate way to handle this.


9 Jul 2013, 9:38 PM
I don't believe there's a simple means via the framework API to validate keystrokes / entries like you have with other form elements like textarea.

But, you do have access to the change event where you can check the value using regular expressions and set the value as needed (trim unwanted characters).