File "editor.ts"
Full path: /home/dora/public_html/wp-content/plugins/code-snippets/js/editor.ts
File size: 403 bytes
MIME-type: --
Charset: utf-8
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
})
)