Features / Usability

Features / Usability

Syntax highlighting

posts: 2


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

$menu = $menubar->getHomeMenu();
if($menu->link != "") {
    print "\t<td width=\"7%\" valign=\"top\">\n";
    print "\t</td>\n";

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

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

Why Register?

Register at tiki.org and you'll be able to use the account at any *.tiki.org site, thanks to the InterTiki feature. A valid email address is required to receive site notifications and occasional newsletters. You can opt out of these items at any time.