Pass the editor object to event handlers as a parameter