beforeKeyDown get current value typed

Tags: #<Tag:0x00007efc61e67968>

Hello, in beforeKeyDown:

beforeKeyDown: function (e) {
var value= this.getActiveEditor().getValue();

the value of this.getActiveEditor().getValue(); is not the current value typed, how can i get it? I need all string typed to apply a regular expression for block user to typed some special char.

Hi @e.barbato

Here you can find an example of how you can get current typed value: https://jsfiddle.net/5dc6o9n0/5/

Do let me know if that solution helps you.

It works! Thank you for your support!

That’s great to hear! I will close the topic then.