CMTV
Well-known member
In "Insert code" dialog, PHP code is not highlighted. It only work when prepending the code with
The highlighting within the post itself works fine with/without
This happens because of the "wrong"
It should be
See this also:
<?php
. This is super inconvenient.The highlighting within the post itself works fine with/without
<?php
.This happens because of the "wrong"
mime
in Data\CodeLanguage.php
:
PHP:
'php' => [
'modes' => [
'htmlmixed',
'xml',
'javascript',
'css',
'clike',
'php'
],
'mime' => 'application/x-httpd-php',
'common' => true
],
'mime' => 'text/x-php'
.See this also:
Implemented - Plain not-wrapped php for <xf:codeeditorrow...
The suggestion is simple: add a new mode called php-plain to the list of CodeMirror supported languages with text/x-php mime type. This can be useful for addon creators who want to add php editor rows in their addon.
xenforo.com