How would you implement a right click action in a text editor?

I would like to do a one-item popup menu (or equivalent) when the user right clicks in a text editor. How would one go about that? There is no onRightClick in a textEditor object I think. Any cues would be appreciated.

Inherit TextEditor and override the addPopupMenuItems and performPopupMenuAction methods. (Also read the documentation about those.)


Dang, that simple! Can’t believe I missed that. Thx for pointing me in the right direction!