Codemirror editor as a directive