Add condition to check whether editor is active