Markdown usage

I have a string. I want to show it using Markdown. How?? Why are there no examples? I would expect something useful on but there really isn’t.

Is it a static function? Do I have to init it somewhere before? Is it part of CHtml? Etc etc

An example would be greatly appreciated. Thanks!

<?php $this->beginWidget('CMarkdown');?>

This is my markdown formatted content

<?php $this->endWidget();?>

What i did was just using the standard way:

$markdown = new CMarkdown;

echo $markdown->transorm($text);

because you wont always need a widget.