updated for codemirrors' new  event triggering