You are here

README.txt in GeSHi Filter for syntax highlighting 8

Same filename in this branch
  1. 8 README.txt
  2. 8 codesnippetgeshi/README.txt
Same filename and directory in other branches
  1. 8.2 README.txt
  2. 5.2 README.txt
  3. 5 README.txt
  4. 6 README.txt
  5. 7 README.txt
============================
GeSHi Filter (Drupal Module)
============================


DESCRIPTION
-----------
The GeShi Filter is a Drupal module for syntax highlighting of pieces of
source code. It implements a filter that formats and highlights the syntax of
source code between for example <code>...</code>.


DEPENDENCY
----------
This module requires the third-party library GeShi 1.0.x (Generic Syntax
Highlighter, written by Nigel McNie) which can be found at
  http://qbnz.com/highlighter
See installation procedure below for more information.

The current version and development can be found at 
  https://github.com/GeSHi/geshi-1.0


INSTALLATION
------------

There 3 ways to install geshilter in Drupal, I recommend using composer, as it
is more simple to install, but the old way downloading the library and using
the module libraries is still available.

Full composer:
  1. On Drupal root, run this command:
     composer require drupal/geshifilter
   
     It will put the geshifilter module under /modules and the Geshi library
  	 under /vendor. 
	 
  2. Goto example.com/admin/modules (replace the example.com with the real name
     of your site) or you can click on "extend" in the admin toolbar and enable
  	 the geshi module.
   
  3. You can go to configuration now.
   
Download the module and install the library with composer
  1. Download the module from the project page 
     https://drupal.org/project/geshifilter and place it in the modules folder 
	   in drupal root.
   	 You can download it with drush if you want with:
	   drush dl geshifilter
	 
  2. On Drupal root run this command to instal the Geshi Library:
     composer require geshi/geshi
	 
  3. Goto example.com/admin/modules (replace the example.com with the real name
     of your site) or you can click on "extend" in the admin toolbar and enable
  	 the geshi module.
	  
  4. You can go to configuration now

Download everything(same as drupal 7)
  1. Download the module from the project page 
     https://drupal.org/project/geshifilter and place it in the modules folder 
     in drupal root.
   	 You can download it with drush if you want with:
  	 drush dl geshifilter
 
  2. Download the GeSHi library from
     https://github.com/GeSHi/geshi-1.0
	 
  3. Extract it. It will create a folder with some files and a directory with
     The name src. Copy the src directory to the folder libraries in your
  	 Drupal root. Rename the src folder to geshi. Just to make sure: you will
  	 have a file drupal root/libraries/geshi/geshi.php not
     drupal root/libraries/geshi/src/geshi.php.
	 
  4. We need too the libraries module, download it from 
     https://www.drupal.org/project/libraries and place it under you modules
  	 folder.
	
  5. Goto example.com/admin/modules (replace the example.com with the real name
     of your site) or you can click on "extend" in the admin toolbar and enable
  	 the geshi module and the libraries module(need both modules enabled in
  	 this case).
	 
  6. You can go to configuration now	


CONFIGURATION
-------------
1. The general GeSHi Filter settings can be found by navigating to:
  Configuration > Content authoring > Geshifilter 
  OR admin/config/content/formats/geshifilter

  If your library is detected, it should show something like below,
  GESHI LIBRARY VERSION 1.0.8.12 DETECTED

  If you use ckeditor that is default now in Drupal 8 i recomment that you
  change tow settings. In Generic syntax highlighting tags add the "pre" tag, as
  you can write inside a pre block without ckeditor changing every new line to
  <br> which will show in the output. Enable Decode entities because ckeditor
  will encode some chars and without this setting they will show in the
  encoded format in the page.
  
2. Now go to admin/config/content/formats (Configuration -> Content authoring ->
   Text formats and Editors). We have to enable the geshifilter in one or more
   text formats. So choose one text format and click on configure. Now just 
   enable geshifilter and save.


USAGE
-----
The basic usage (with the default settings) is:
  <code language="java">
  for (int i; i<10; ++i) {
    dothisdothat(i);
  }
  </code>
When language tags are enabled (like "<java>" for Java) you can also do
  <java>
  for (int i; i<10; ++i) {
    dothisdothat(i);
  }
  </java>
More options and tricks can be found in the filter tips of the text format at
www.example.com/?q=filter/tips .


AUTHORS
-------
Original module by:
  Vincent Filby <vfilby at gmail dot com>

Drupal.org hosted version for Drupal 4.7:
  Vincent Filby <vfilby at gmail dot com>
  Michael Hutchinson (http://compsoc.dur.ac.uk/~mjh/contact)
  Damien Pitard <dpdev00 at gmail dot com>

Port to Drupal 5:
  rötzi (http://drupal.org/user/73064)
  Stefaan Lippens (http://drupal.org/user/41478)
  
Port to Drupal 7 and 8
  Fernando Correa da Conceição (https://www.drupal.org/u/yukare)

File

README.txt
View source
  1. ============================
  2. GeSHi Filter (Drupal Module)
  3. ============================
  4. DESCRIPTION
  5. -----------
  6. The GeShi Filter is a Drupal module for syntax highlighting of pieces of
  7. source code. It implements a filter that formats and highlights the syntax of
  8. source code between for example ....
  9. DEPENDENCY
  10. ----------
  11. This module requires the third-party library GeShi 1.0.x (Generic Syntax
  12. Highlighter, written by Nigel McNie) which can be found at
  13. http://qbnz.com/highlighter
  14. See installation procedure below for more information.
  15. The current version and development can be found at
  16. https://github.com/GeSHi/geshi-1.0
  17. INSTALLATION
  18. ------------
  19. There 3 ways to install geshilter in Drupal, I recommend using composer, as it
  20. is more simple to install, but the old way downloading the library and using
  21. the module libraries is still available.
  22. Full composer:
  23. 1. On Drupal root, run this command:
  24. composer require drupal/geshifilter
  25. It will put the geshifilter module under /modules and the Geshi library
  26. under /vendor.
  27. 2. Goto example.com/admin/modules (replace the example.com with the real name
  28. of your site) or you can click on "extend" in the admin toolbar and enable
  29. the geshi module.
  30. 3. You can go to configuration now.
  31. Download the module and install the library with composer
  32. 1. Download the module from the project page
  33. https://drupal.org/project/geshifilter and place it in the modules folder
  34. in drupal root.
  35. You can download it with drush if you want with:
  36. drush dl geshifilter
  37. 2. On Drupal root run this command to instal the Geshi Library:
  38. composer require geshi/geshi
  39. 3. Goto example.com/admin/modules (replace the example.com with the real name
  40. of your site) or you can click on "extend" in the admin toolbar and enable
  41. the geshi module.
  42. 4. You can go to configuration now
  43. Download everything(same as drupal 7)
  44. 1. Download the module from the project page
  45. https://drupal.org/project/geshifilter and place it in the modules folder
  46. in drupal root.
  47. You can download it with drush if you want with:
  48. drush dl geshifilter
  49. 2. Download the GeSHi library from
  50. https://github.com/GeSHi/geshi-1.0
  51. 3. Extract it. It will create a folder with some files and a directory with
  52. The name src. Copy the src directory to the folder libraries in your
  53. Drupal root. Rename the src folder to geshi. Just to make sure: you will
  54. have a file drupal root/libraries/geshi/geshi.php not
  55. drupal root/libraries/geshi/src/geshi.php.
  56. 4. We need too the libraries module, download it from
  57. https://www.drupal.org/project/libraries and place it under you modules
  58. folder.
  59. 5. Goto example.com/admin/modules (replace the example.com with the real name
  60. of your site) or you can click on "extend" in the admin toolbar and enable
  61. the geshi module and the libraries module(need both modules enabled in
  62. this case).
  63. 6. You can go to configuration now
  64. CONFIGURATION
  65. -------------
  66. 1. The general GeSHi Filter settings can be found by navigating to:
  67. Configuration > Content authoring > Geshifilter
  68. OR admin/config/content/formats/geshifilter
  69. If your library is detected, it should show something like below,
  70. GESHI LIBRARY VERSION 1.0.8.12 DETECTED
  71. If you use ckeditor that is default now in Drupal 8 i recomment that you
  72. change tow settings. In Generic syntax highlighting tags add the "pre" tag, as
  73. you can write inside a pre block without ckeditor changing every new line to

  74. which will show in the output. Enable Decode entities because ckeditor
  75. will encode some chars and without this setting they will show in the
  76. encoded format in the page.
  77. 2. Now go to admin/config/content/formats (Configuration -> Content authoring ->
  78. Text formats and Editors). We have to enable the geshifilter in one or more
  79. text formats. So choose one text format and click on configure. Now just
  80. enable geshifilter and save.
  81. USAGE
  82. -----
  83. The basic usage (with the default settings) is:
  84. for (int i; i<10; ++i) {
  85. dothisdothat(i);
  86. }
  87. When language tags are enabled (like "" for Java) you can also do
  88. for (int i; i<10; ++i) {
  89. dothisdothat(i);
  90. }
  91. More options and tricks can be found in the filter tips of the text format at
  92. www.example.com/?q=filter/tips .
  93. AUTHORS
  94. -------
  95. Original module by:
  96. Vincent Filby
  97. Drupal.org hosted version for Drupal 4.7:
  98. Vincent Filby
  99. Michael Hutchinson (http://compsoc.dur.ac.uk/~mjh/contact)
  100. Damien Pitard
  101. Port to Drupal 5:
  102. rötzi (http://drupal.org/user/73064)
  103. Stefaan Lippens (http://drupal.org/user/41478)
  104. Port to Drupal 7 and 8
  105. Fernando Correa da Conceição (https://www.drupal.org/u/yukare)