Change the way to get active editor