| 1 |
import { defineMode, getMode, EditorConfiguration, ModeSpec } from 'codemirror' |
| 2 |
import './php-lint' |
| 3 |
|
| 4 |
type ModeSpecOptions = { |
| 5 |
startOpen: boolean |
| 6 |
} |
| 7 |
|
| 8 |
/** Define a new mode which starts the phpmixed mode in php mode instead of html mode */ |
| 9 |
defineMode('php-snippet', (config: EditorConfiguration) => |
| 10 |
getMode(config, <ModeSpec<ModeSpecOptions>> { |
| 11 |
name: 'application/x-httpd-php', |
| 12 |
startOpen: true |
| 13 |
}) |
| 14 |
) |
| 15 |
|