Hello Igor,
Please use the following approach, which will be incorporated in the next version of RadTextBox. Note that the custom Javascript code must be registered after the embedded one, i.e. you have to place it in the <body> or inside an external JS file, which is included in the <body>.
I have updated your Telerik points for this bug report. Thanks.
All the best,
Dimo
the Telerik team