Skip to content

Commit

Permalink
Update readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Aug 4, 2012
1 parent 3c6f19b commit 162dde8
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions README.textile
Expand Up @@ -14,9 +14,12 @@ To use the helper, include the helper in your controller:

public $helpers = array('Geshi.Geshi');

In your views you can use @$this->Geshi->highlight($html);@ to highlight
a block of text inside some HTML. By default the helper will highlight any
@<pre>@ block and convert it into highlighted code.
h4. Methods

**highlight($html)**

This method will scan HTML for @<pre>@ blocks with a known lang attribute. This
method is good for highlighting code samples in blog posts, or wiki pages.

You can indicate the language of the text in a @<pre>@ block by setting the lang
attribute. For example:
Expand All @@ -28,6 +31,11 @@ attribute. For example:

Will be highlight as php code.

**highlightText($text, $language)**

This method will highlight @$text@ in @$language@. Use this method to
highlight text in any language GeSHI supports.

h4. Configuration

You can configure the GeSHI instance by creating a @geshi.php@ file in your
Expand Down

0 comments on commit 162dde8

Please sign in to comment.