Files
SIGE-WEB-snapshot/ambiente-de-test/wp-content/plugins/code-snippets/js/editor.ts

15 lines
403 B
TypeScript

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
})
)