Okay I followed snippsat his example and changed some things to see if I understand, and I do. (Scru's link is a good reference but to learn from it's quite heard)
I know how to colorize the text and I think I'm even capable of Syntax-highlighting a certain text. However I don't know how to colorize a text when it's been typed, cause that's how a text-editor works. you can add content which is also being colorised
somebody knows how I can capture what the user types before it is being passed to the screen?