Gallery of themes for Code Prettify

Simple and lightweight syntax highlighting of source code snippets using Google Code Prettify JavaScript library for Drupal.

You don't need to add additional markup to source code and neither to specify the language of source code snippets since prettify will guess. Code prettify module for Drupal is compatible with WYSIWYG editors and includes several themes to customize the colors and styles of source code snippets.

Google Code Prettify JavaScript library supports all C-like (Java, PHP, C#, etc), Bash-like, and XML-like languages without need to specify the language and has customizable styles via CSS. Widely used with good cross-browser support. For more information, visit their project page on code.google.com.

Installation

  • Download the latest Google Code Prettify JavaScript library from: http://code.google.com/p/google-code-prettify/
  • Extract the content and place the js files and css inside of the following directory: sites/all/libraries/prettify
  • Enable module as usual.

Please consult README.txt for more information.

Usage

Out of the box, Code prettify module for Drupal comes configured to automatically perform syntax highlighting of source code snippets in <pre> or <code> tags on your Drupal pages. Automatic syntax highlighting mode is pretty simple, but powerful at the same time. Several settings can be configured at: Administration >> Configuration >> User interface >> Code prettify

In addition, code prettify module also provides a filter to allow users can post code verbatim. Prettify filter can be enabled and configured at: Administration >> Configuration >> Content authoring >> Text formats

Project Information

Downloads