Mode Runner Demo
Running a CodeMirror mode outside of the editor.
CodeMirror.runMode function, defined
lib/runmode.js takes the following arguments:
- The document to run through the highlighter.
mode (mode spec)
- The mode to use (must be loaded as normal).
output (function or DOM node)
- If this is a function, it will be called for each token with
two arguments, the token's text and the token's style class (may
nullfor unstyled tokens). If it is a DOM node, the tokens will be converted to
spanelements as in an editor, and inserted into the node (through