A Syntax highlighter for EDx/Open EDx

Adapted from http://coderazzi.net/javascript/prettify/index.html by M.Buffa.

This tool is useful for embedding in EDx/Open EDx HTML texts some source code. It uses a modified version of the google code prettify JS lib.

HowTo:

  1. Copy once these css rules into the HTML of the target page.
  2. Paste in the text area below the code to highlight, then, press the prettify me button.
  3. Copy the resulting HTML into the target page.

   

Produced html (already selected, just copy to clipboard using ctrl-c or cmd-c):

Preview of the results: