Skip to content
Snippets Groups Projects
Commit cc23d768 authored by Andrey Lushnikov's avatar Andrey Lushnikov Committed by Marijn Haverbeke
Browse files

[runmode addon] Define text/plain mode in standalone script.

parent 40a973a4
No related branches found
No related tags found
No related merge requests found
......@@ -91,6 +91,10 @@ CodeMirror.getMode = function (options, spec) {
return mfactory(options, spec);
};
CodeMirror.registerHelper = CodeMirror.registerGlobalHelper = Math.min;
CodeMirror.defineMode("null", function() {
return {token: function(stream) {stream.skipToEnd();}};
});
CodeMirror.defineMIME("text/plain", "null");
CodeMirror.runMode = function (string, modespec, callback, options) {
var mode = CodeMirror.getMode({ indentUnit: 2 }, modespec);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment