refactor(editor): introduces a ModeListener interface