If you are typing in the box an the colour is set to white, there is no need to run the code.
You only need to run it when you add text that you haven't typed (eg copy/paste from your example).
Therefore, use that code in the TextChanged event, but perform a check before running it as to whether the user has typed the text or added it another way
EDIT: Check the answer to this question: Detecting a paste into a RichTextBox, it might help you