Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A CakePHP 1.3+ plugin for parsing various formatting languages
PHP
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
libs
tests/cases/helpers
vendors
views/helpers
LICENSE
README.md

README.md

Embellish Plugin for CakePHP 1.3+

Embellish plugin provides an easy way to parse various formatting languages into HTML

Supported formats

  • BBCode
  • Markdown
  • Textile

Installation

  • Download the plugin

    $ cd /path/to/your/app/plugins && git clone git://github.com/joebeeson/embellish.git
    
  • Add the TongueHelper to your AppController

    public $helpers = array(
        // Replace 'Syntax' with your preferred format
        'Embellish.Tongue' => 'Syntax'
    );
    

Usage

To parse a string into its HTML version, simply call the TongueHelper's toHtml method.

    echo $this->Tongue->toHtml('This is [b]BBCode[/b]!');

You can also change syntaxes "on the fly" by using the setSyntax method

    $this->Tongue->setSyntax('Markdown');
    echo $this->Tongue->toHtml('This is *Markdown*!');

Thanks

The actual parsing of the formatting was achieved by using open source implementations. Many thanks are owed to the following developers...

Something went wrong with that request. Please try again.