How to use JS functions

@alemartinezit Just be aware the onInput() currently does not work with Rich Text element. For that case use onKeyPress with timeout (+ in cases where you need to detect non value key press such as the Enter key), otherwise the oninput will be better as it also detects copied-pasted inputs.