CMTV
Well-known member
- Affected version
- 2.0.1 - 2.0.2
Hi!
Put the code below in any admin template (for example in
This code creates code editor row without any errors:
But the code is not highlighting and throws an error when hitting "Enter":
I think this error happens because of the incorrect mode calls order. "clike" mode should be loaded first and only after that "php" mode should be loaded. So I tried to change the order in
I did not notice any errors and the editor is even making automatic tabulation but still no highlighting...
Moreover,
Other modes (
UPD 1: tried to change
Put the code below in any admin template (for example in
addon_list
):
HTML:
<xf:codeeditorrow mode="php" data-line-wrapping="true" class="codeEditor--autoSize" />
This code creates code editor row without any errors:
But the code is not highlighting and throws an error when hitting "Enter":
I think this error happens because of the incorrect mode calls order. "clike" mode should be loaded first and only after that "php" mode should be loaded. So I tried to change the order in
CodeLanguage
class:
PHP:
//
// Before:
// 'php',
// 'clike'
//
// Now:
'php' => [
'modes' => [
'clike',
'php'
],
'mime' => 'text/x-php',
'common' => true
],
I did not notice any errors and the editor is even making automatic tabulation but still no highlighting...
Moreover,
function
has a cm-variable
class but it must has cm-keyword
class so there is something working completely wrong with mode="php"
...Other modes (
html
, javascript
) are working fine:UPD 1: tried to change
cm-variable
class to cm-keyword
. The word was highlighted correctly so everything is okay with LESS/CSS side.
Last edited: