Content, editing and rendering

Coloration Code

Syntax higlighting of code placed in articles

Prefix : coloration_code
Used in 84 Web sites
Updated on 9 June 2023
SPIP 4.2

1.0.0  being tested

Download

Updated on 9 June 2023

Compatible:
  • SPIP 4.2

You just have to put it between the tags:
<code class="language">...</code>
or with a frame
<cadre class="langage">...</cadre>.

The possible languages are the ones supported by http://sourceforge.net/projects/geshi/ with an extra class: "spip".

By default, when the highlighted code has more than one line, il will be put in cache as text and proposed to upload. This feature may be controlled globaly through the constant PLUGIN_COLORATION_CODE_TELECHARGE default true. It may also be forced locally by adding a class "sans_telechargement" in a way or "chargement" in the other as
<code class="php sans_telechargement">

You may also use coloration_code_color as a filter in a squelette as
#TEXTE**|coloration_code_color{spip,code}: highlights #TEXTE with langage "spip" in format code (without frame), see example lecode.html. From article url would be #URL_SITE_SPIP/spip.php?page=lecode&id_article=#ENV{id_article}

XML file
Version
1.0.0
Compatiblity
SPIP ≥ 4.2.0 and ≤ 4.2.*
Status
being tested
Author
bricebou
License
GNU/GPL
Language module
coloration_code
Reference language
français
Translations
français
Package
coloration_code-8028e-coloration_code-1.0.0.zip
Size
618.9 KiB
Built on
09-06-2023 21:15
Hosted by
SPIP-Zone - Plugins
Required plugins
Entries for forms ≥ 4.7.0
YAML ≥ 3.0.1

0.10.9  stable

Download

Updated on 15 April 2022

Compatible:
  • SPIP 4.1
  • SPIP 4.0
  • SPIP 3.3
  • SPIP 3.2

You just have to put it between the tags:
<code class="language">...</code>
or with a frame
<cadre class="langage">...</cadre>.

The possible languages are the ones supported by http://sourceforge.net/projects/geshi/ with an extra class: "spip".

By default, when the highlighted code has more than one line, il will be put in cache as text and proposed to upload. This feature may be controlled globaly through the constant PLUGIN_COLORATION_CODE_TELECHARGE default true. It may also be forced locally by adding a class "sans_telechargement" in a way or "chargement" in the other as
<code class="php sans_telechargement">

You may also use coloration_code_color as a filter in a squelette as
#TEXTE**|coloration_code_color{spip,code}: highlights #TEXTE with langage "spip" in format code (without frame), see example lecode.html. From article url would be #URL_SITE_SPIP/spip.php?page=lecode&id_article=#ENV{id_article}

XML file
Version
0.10.9
Compatiblity
SPIP ≥ 3.2.0 and ≤ 4.1.*
Status
stable
Author
Pierre Andrews (Mortimer), ARNO*
Package
coloration_code-8028e-coloration_code-v0.10.9.zip
Size
1.2 MiB
Built on
15-04-2022 16:01
Hosted by
SPIP-Zone - Plugins

0.9.17  stable

Download

Updated on 5 September 2018

Compatible:
  • SPIP 3.2
  • SPIP 3.1
  • SPIP 3.0
  • SPIP 2.1
  • SPIP 2.0

You just have to put it between the tags:
<code class="language">...</code>
or with a frame
<cadre class="langage">...</cadre>.

The possible languages are the ones supported by http://sourceforge.net/projects/geshi/ with an extra class: "spip".

By default, when the highlighted code has more than one line, il will be put in cache as text and proposed to upload. This feature may be controlled globaly through the constant PLUGIN_COLORATION_CODE_TELECHARGE default true. It may also be forced locally by adding a class "sans_telechargement" in a way or "chargement" in the other as
<code class="php sans_telechargement">

You may also use coloration_code_color as a filter in a squelette as
#TEXTE**|coloration_code_color{spip,code}: highlights #TEXTE with langage "spip" in format code (without frame), see example lecode.html. From article url would be #URL_SITE_SPIP/spip.php?page=lecode&id_article=#ENV{id_article}

XML file
Version
0.9.17
Compatiblity
SPIP ≥ 2.0.0 and ≤ 3.2.*
Status
stable
Author
Pierre Andrews (Mortimer), ARNO*
Package
coloration_code-8028e-coloration_code-v0.9.17.zip
Size
1.1 MiB
Built on
05-09-2018 17:47
Hosted by
SPIP-Zone - Plugins

0.6.8  stable deprecated

Download

Updated on 3 September 2017

Compatible:
  • SPIP 3.1
  • SPIP 3.0
  • SPIP 2.1
  • SPIP 2.0

You just have to put it between the tags:
<code class="language">...</code>
or with a frame
<cadre class="langage">...</cadre>.

The possible languages are the ones supported by http://sourceforge.net/projects/geshi/ with an extra class: "spip".

By default, when the highlighted code has more than one line, il will be put in cache as text and proposed to upload. This feature may be controlled globaly through the constant PLUGIN_COLORATION_CODE_TELECHARGE default true. It may also be forced locally by adding a class "sans_telechargement" in a way or "chargement" in the other as
<code class="php sans_telechargement">

You may also use coloration_code_color as a filter in a squelette as
#TEXTE**|coloration_code_color{spip,code}: highlights #TEXTE with langage "spip" in format code (without frame), see example lecode.html. From article url would be #URL_SITE_SPIP/spip.php?page=lecode&id_article=#ENV{id_article}

XML file
Version
0.6.8
Compatiblity
SPIP ≥ 2.0.0 and ≤ 3.1.*
Status
stable
Author
Pierre Andrews (Mortimer), ARNO*
Package
coloration_code-8028e-coloration_code-v0.6.8.zip
Size
784.2 KiB
Built on
03-09-2017 16:19
Hosted by
SPIP-Zone - Plugins

0.3.0  stable deprecated

Download

Updated on 2 April 2017

Compatible:
  • SPIP 1.9

You just have to put it between the tags:
<code class="language">...</code>
or with a frame
<cadre class="langage">...</cadre>.

The possible languages are the ones supported by http://sourceforge.net/projects/geshi/ with an extra class: "spip".

By default, when the highlighted code has more than one line, il will be put in cache as text and proposed to upload. This feature may be controlled globaly through the constant PLUGIN_COLORATION_CODE_TELECHARGE default true. It may also be forced locally by adding a class "sans_telechargement" in a way or "chargement" in the other as
<code class="php sans_telechargement">

You may also use coloration_code_color as a filter in a squelette as
#TEXTE**|coloration_code_color{spip,code}: highlights #TEXTE with langage "spip" in format code (without frame), see example lecode.html. From article url would be #URL_SITE_SPIP/spip.php?page=lecode&id_article=#ENV{id_article}

XML file
Version
0.3.0
Compatiblity
SPIP ≥ 1.9.0 and ≤ 1.9.2
Status
stable
Author
Pierre Andrews (Mortimer), ARNO*
Language module
colorationcode
Reference language
français
Translations
English , Español
Package
coloration_code_pour_spip_1_9.zip
Size
332.4 KiB
Built on
02-04-2017 18:04
Hosted by
SPIP-Zone - Grenier des plugins

Recent changes

Information not available

Open issues

No open issues

Forum messages

  • 29 December 2023 : Je précise qu’en plus le plugin « Pre & code » ne fonctionne plus lorsque « Coloration code (…)
  • 29 December 2023 : Bonjour J’ai aussi le même constat sur un spip 42.7
  • 2 August 2023 : Bonjour, Depuis la mise à jour en v1.0.0 par SVP, sur un SPIP 4.2, le plugin ne fonctionne (…)
  • 18 September 2019 : Bon, entre temps j’ai trouvé... GeSHi est bien appliqué (et en regardant le source de la page, « (…)
  • 18 September 2019 : Comme mentionne la documentation du plugin : Les lan­ga­ges susceptibles d’être colorisés (…)
  • 18 September 2019 : bizarre dans la prévisualisation ça semble fonctionner :)
  • 18 September 2019 : il suffit de mettre le nom du code dans la class du cadre ? comme ceci, exemple d’un cadre code (…)
  • 17 September 2019 : Bof, bof, :) Comme dit si bien la documentation, ce ne sont que les les quelques cas pris en (…)
  • 13 August 2018 : Je m’empresse de répondre moi-même à mon énorme erreur : mais non, le texte change bien en (…)
  • 13 August 2018 : Hello, merci pour ce chouette plugin ! Question : je suis sur un site multilingue, cependant (…)