HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

PrettyPrint 1.3

Adds google-code-prettify (http://code.google.com/p/google-code-prettify/) to code entered into the editor using the tag pre class="prettyprint linenums" to wrap the code.You can change the css style sheet to edit the looks of the formating.

In the last version 1.2 , I added the jquery that was required in the master, to the plugin. It now works automatically when you add the < pre > Tag.

Remember to refresh the page to see the formatted code.

About the code and pre tags

< code >A piece of computer code< /code >

Definition and Usage

The < code > tag is a phrase tag. It defines a piece of computer code.

The < code > tag also supports the Global Attributes in HTML.

The < code > tag also supports the Event Attributes in HTML.

< pre >
Text in a pre element
is displayed in a fixed-width
font, and it preserves
both      spaces and
line breaks
< /pre >

Definition and Usage

The < pre > tag defines preformatted text.

Text in a < pre > element is displayed in a fixed-width font (usually Courier), and it preserves both spaces and line breaks.
Use the < pre > element when displaying text with unusual formatting, or some sort of computer code.

Tested on Vanilla 2.0.18.8 and 2.1 using cleditor editor and ButtonBar

version 1.3 changed the code a bit because it had suddenly stopped working

Screenshots

Questions