working with code mirror (javascript and yaml modes)