I’m a less experienced JS programmer, and I’m having a hard time filling in the blanks in the manual. I need to add an event handler:
cm.on(“cursorActivity”, onCursorActivity);
This works fine when I add it into any context which contains a copy of cm, such as CodeMirror.defineOption(). But I don’t need to define an option. I’m using it for linting, so I want to put it in javascript-lint.js. CodeMirror.defineInitHook() looked good, but it doesn’t supply cm. It works when I add to lint.js, but I don’t think I’m supposed to mess with that one.
I’m sure I’m missing something obvious! Thanks for your help, and for a truly wonderful product!