HEX
Server: Apache/2.4.67 (Debian)
System: Linux 66deac74b035 6.8.0-117-generic #117-Ubuntu SMP PREEMPT_DYNAMIC Tue May 5 19:26:24 UTC 2026 x86_64
User: www-data (33)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: /var/www/html/wp-content/plugins/code-snippets/js/editor.ts
import { defineMode, getMode, EditorConfiguration, ModeSpec } from 'codemirror'
import './php-lint'

type ModeSpecOptions = {
	startOpen: boolean
}

/** Define a new mode which starts the phpmixed mode in php mode instead of html mode */
defineMode('php-snippet', (config: EditorConfiguration) =>
	getMode(config, <ModeSpec<ModeSpecOptions>> {
		name: 'application/x-httpd-php',
		startOpen: true
	})
)