Loading...
 
Skip to main content

inline syntax highlighting of CODE plugin

Status
Open
Subject
inline syntax highlighting of CODE plugin
Version
17.x
Category
  • Feature request
Feature
Syntax highlighter (Codemirror)
Resolution status
New
Submitted by
drsassafras
Lastmod by
drsassafras
Rating
(0)
Related-to
Description

Syntax highlighting for PHP (and presumably other languages) does not appear to work at first glance. Upon further inspection, its clear that syntax hiliting within the CODE plugin expects a HTML file, rather than an inline code example. I propose a reversal of behavior to expecting an inline example.

Using this code:

Copy to clipboard
{CODE(colors="php")} // this is a comment basename($alpha); {CODE}


This is output:

Copy to clipboard
// this is a comment basename($alpha);


On the other hand using this code:
Using this code:

Copy to clipboard
{CODE(colors="php")} <?php // this is a comment basename($alpha); {CODE}


The highlighting is now enabled, but its not really the right code example any more:
Using this code:

Copy to clipboard
<?php // this is a comment basename($alpha);


Further reading:
https://groups.google.com/forum/#!topic/codemirror/j7CsgZgM01c
http://codemirror.net/mode/php/index.html

Priority
25
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
6357
Created
Wednesday 31 May, 2017 14:11:11 UTC
by drsassafras
LastModif
Friday 02 June, 2017 09:36:42 UTC


Show PHP error messages