UserCandy Documentation - BBCode Helper
BBCode Helper is designed with the ability to be used anywhere within the framework. BBCode buttons can be added to above a textarea with the following code:
Code
use Helpers\{BBCode,Form};

<!-- BBCode Buttons -->
<?=BBCode::displayButtons('content')?>

<!-- Form Textarea -->
<?=Form::textBox(array('type' => 'text', 'name' => 'content', 'id' => 'content', 'class' => 'form-control', 'value' => $content, 'placeholder' => 'Content', 'rows' => '6')); ?>
Note: Make sure that the id in the textarea matches the argument in the displayButtons function. Notice in the example above, they are both set to content.
To display the content with the BBCode format use code similar to the following:
Code
use Helpers\BBCode;

<?=BBCode::getHtml($content);?>