Editing, printing, writing

CODE HIGLIGHTING

Syntax higlighting of code placed in articles

Prefix : coloration_code
Used in 709 Web sites
Updated on 28 February 2017
  • SPIP 3.1
  • SPIP 3.0
  • SPIP 2.1
  • SPIP 2.0
  • SPIP 1.9

0.9.7 - stable

Compatible: SPIP 3.1 SPIP 3.0 SPIP 2.1 SPIP 2.0
Show the description

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}

Version
0.9.7
Compatiblity
2.0.0 ≤ SPIP ≤ 3.1.*
Status
stable
Author
Pierre Andrews (Mortimer), ARNO*
Package
coloration_code.zip
Size
1.1 Mb
Built on
28-02-2017 09:04
Hosted by
SPIP-Zone - Plugins

0.6.7 - stable

Compatible: SPIP 3.1 SPIP 3.0 SPIP 2.1 SPIP 2.0
Show the description

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}

Version
0.6.7
Compatiblity
2.0.0 ≤ SPIP ≤ 3.1.*
Status
stable
Author
Pierre Andrews (Mortimer), ARNO*
Package
coloration_code_pour_spip_2_0.zip
Size
792.4 kb
Built on
23-12-2015 14:08
Hosted by
SPIP-Zone - Plugins

0.3.0 - stable

Compatible: SPIP 1.9
Show the description

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}

Version
0.3.0
Compatiblity
1.9.0 ≤ SPIP ≤ 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 kb
Built on
24-08-2014 21:16
Hosted by
SPIP-Zone - Grenier des plugins

Recent changes

  • Revision 103080 : Up de Z
  • Revision 103079 : Un peu de PSR
  • Revision 103078 : Respecter la constante PLUGIN_COLORATION_CODE_SANS_STYLES
  • Revision 102955 : On ajoute aussi la CSS personnalisée dans l’espace public Un peu de PSR aussi
  • Revision 101999 : [Salvatore] paquet-coloration_code Export depuis ​http://trad.spip.net
  • Revision 97242 : [Salvatore] paquet-coloration_code Export depuis ​http://trad.spip.net
  • Revision 95058 : Mea Culpa dans r93266 : geshi.php avait une petite modification qui n’avait pas été remise ! (...)
  • Revision 94456 : Bugfix propre du cas fonction inexistante : this->language_dataREGEXPS?[] n’est pas forcement un (...)
  • Revision 94013 : [Salvatore] paquet-coloration_code Export depuis ​http://trad.spip.net
  • Revision 93881 : Paquet et plugin.xml doivent avoir la même version

Forum messages

  • 6 March 2013 : J’aurais voulu ajouter une classe au code généré, pour pouvoir l’afficher au milieu du texte (en (...)
  • 18 December 2012 : Bonjour Juste une petite remarque : le plugin en version 0.6.6 supprime toutes les lignes (...)
  • 22 November 2012 : Bonjour, Je rencontre le soucis suivant : j’ai imposé overflow:auto dans les pages de style pour (...)
  • 28 July 2011 : 2 problèmes : je n’ai pas les numéros de ligne avec ie9 (serveur easyphp-5.3.4, win7) mais sur (...)
  • 10 June 2011 : Bon juste au dessus ca marchait pour les lignes jusqu’à 9. J’ai amélioré un peu mon code pour (...)
  • 10 June 2011 : Je me reponds à moi même, j’ai rajouté dans la function coloration_code_color : (...)
  • 10 June 2011 : Je cherche a utiliser la fonction Highlighting Special Lines “Extra” de GeSHi. Je ne pense pas (...)
  • 27 May 2011 : Compatible avec SPIP3.0-dev de ce que j’en ai vu ( pour le class=’spip’). Depuis il y a une (...)
  • 15 May 2011 : Bonjour, merci pour ce plugin ! Une question, pour un code assez long à afficher, est il (...)
  • 8 February 2011 : merci, c’est corrigé …
Plugins SPIP
This site is powered by SPIP 3.2.0-dev SVN [23172] and the following plugins :