Server IP : 209.38.156.173 / Your IP : 216.73.216.122 [ Web Server : Apache/2.4.52 (Ubuntu) System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.1.2-1ubuntu2.22 Disable Function : NONE Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/share/nodejs/codemirror/src/addon/runmode/ |
Upload File : |
import StringStream from "../../util/StringStream.js" import { countColumn } from "../../util/misc.js" import * as modeMethods from "../../modes.js" // declare global: globalThis, CodeMirror // Create a minimal CodeMirror needed to use runMode, and assign to root. var root = typeof globalThis !== 'undefined' ? globalThis : window root.CodeMirror = {} // Copy StringStream and mode methods into CodeMirror object. CodeMirror.StringStream = StringStream for (var exported in modeMethods) CodeMirror[exported] = modeMethods[exported] // Minimal default mode. CodeMirror.defineMode("null", () => ({token: stream => stream.skipToEnd()})) CodeMirror.defineMIME("text/plain", "null") CodeMirror.registerHelper = CodeMirror.registerGlobalHelper = Math.min CodeMirror.splitLines = function(string) { return string.split(/\r?\n|\r/) } CodeMirror.countColumn = countColumn CodeMirror.defaults = { indentUnit: 2 } export default CodeMirror