Loading...
 
Features / Usability

Features / Usability


Syntax highlighting

posts: 2

Hello,

I'm trying to get syntax highlighting to run, but it doesn't work as expected.

Control Panels / Advanced / Editing and Plugins / General settings / Features / Code Editor (CodeMirror): on
Control Panels / Advanced / Editing and Plugins / General settings / Features / Theme for syntax highlighting: default

Then I tried to edit a wiki page like described here: https://doc.tiki.org/PluginCode#Codemirror_-_Supported_Languages

Copy to clipboard
{CODE(colors="php")} <?php $menu = $menubar->getHomeMenu(); if($menu->link != "") { print "\t<td width=\"7%\" valign=\"top\">\n"; $menu->printMenu(); print "\t</td>\n"; } {CODE}


The code is formatted, but only like shown in the attached image.
It doesn't matter which color or theme I set, the result is the same.

The code editor itself is set to Wiki (and not WYSIWYG).
We use TikiWiki 19.

It seems that upload of attachments doesn't work here, so I uploaded the image on imgur: https://imgur.com/1sfsiDG

Kind regards
Florian

posts: 2

Hi luciash d' being,

thank you for your answer!
I already tried that but it had no effect.

I found out, that

  • wikiplugin_code.php is executed
  • codemirror.js is included
  • codemirror_modes.js is included
  • codemirror_tiki.js is included
  • codemirror/mode/sql/sql.js is NOT inlcuded
  • codemirror.css is included, but not applied


I don't know if this helps or not

Kind regards
Florian