How to get typed value?

For example,I type a ‘$’ in the editor,how can I get what I typed?

EditorView.inputHandler, maybe? Or observe updates with an updateListener and look at the changes they make? Depends a lot on what you want to do when something is typed.