PHP Classes

File: editor/codemirror/src/addon/runmode/codemirror-standalone.js

Recommend this page to a friend!
  Classes of Cedric Maenetja   Custom PHP HTML Parser   editor/codemirror/src/addon/runmode/codemirror-standalone.js   Download  
File: editor/codemirror/src/addon/runmode/codemirror-standalone.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Custom PHP HTML Parser
Process HTML to replace it with parameter values
Author: By
Last change:
Date: 1 year ago
Size: 936 bytes
 

Contents

Class file image Download
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