Thanks!
Done some fixes and polished a little the class. My example can switch the interface from english to french to show that you can customize the text in the component. Colors are also all customizable in the line count display. Put some "enums" for the contextual menu, so it's easy to figure out. Fixed the problem with the line breaking at the wrong place (also recalculate the line break when you hide/show the linecount). I kept the way you create/delete pointer for the contextual menu, texts are simply created from an string array (array size is referenced from the last enum), So i think if we add more stuff to the editor it will be easy to still support multilingual and still be easy to expand. Just add one an enum and the array size increase with it.
The current example show most of the types of highlighting works as in theses 2 pics:
The main menu displayed here is separate from the interface, but we can do copy/paste/undo operations since you implemented the commands. I show in the example code how to access them from outside the GUI component. We can switch "live" the interface language from english to french. (Would be really easy to add other languages (lating based))
This screen show the example with the english interface and give examples of highlighting:

This screen show the example with the french interface, notice that we can also change the submenu language of the editor

If you look at the group example, there is a little problem.. Nothing major... I will have to investigate your portion of code. I defined 2 groups:
Group 1: start text: "(", end text: ")"
Group 2: start text: "Feature(", end text: ")"
Since the 2 groups have the same ending text and the second goes into line break, it pick the first occurance of the group, the group1 highlight is picked when it should be group2.
If the text stay on the same line, it's ok and the highlighing works.
I will write the documentation tomorrow for all the new stuff that we added to it. And will be in position to propose it. The archive will be hosted from my web site for a while.
EDIT (2011/08/26): Updated the screenshots and made the archive available for download
http://www.clavet.org/files/download/code_editor.zip 3.39Mb