How to identify Editor instance in Editor gui_hooks

Not the most beautiful solution, but

if hasattr(aqt.mw.app.activeWindow(), "editor"):
      editor = aqt.mw.app.activeWindow().editor
5 Likes