Remove special characters from input field

Tags: #<Tag:0x00007efc706b56c0>

Hello, i want to remove special char on digit in input handsontable, but allow bracket ( and ), i’m trying with beforeKeyDown and e.stopImmediatePropagation(); e.preventDefault(); but all shift return 16 in keyCode, thnks

Hey @e.barbato

what particularly you would like to block? Could you share the ASCII or anything that will allow me to specify the char?

i want to block all special char but not / , . ( ) - backslash

That would require setting up a regular expression rule.

ok tks, but how can i take the digit value in beforeKeyDown?

i have found this.getActiveEditor().getValue() thank you!

I’m glad to see such a quick update. Thank you. I guess that we can close the topic. Feel free to open w new one when needed.