HEX
Server: Apache
System: Linux elegant-goodall 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64
User: allende-losmares.com_h71qfkqzx8k (10002)
PHP: 8.0.30
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/allende-losmares.com/httpdocs/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
	})
)