public function toEditor()
{
$text = $this->text;
// remove list item closing tags
$text = str_replace("[/*:m:{$this->uid}]", '', $text);
// remove list item type marker at closing tags
$text = preg_replace("#\\[/list:[ou]:{$this->uid}\\]#", '[/list]', $text);
// strip uids
$text = str_replace(":{$this->uid}]", ']', $text);
// strip url
$text = preg_replace('#<!-- ([emw]) --><a.*?>(.*?)</a><!-- \\1 -->#', '\\2', $text);
// strip relative url
$text = preg_replace('#<!-- l --><a.*?href="(.*?)".*?>.*?</a><!-- l -->#', '\\1', $text);
// strip smilies
$text = preg_replace('#<!-- (s(.*?)) -->.*?<!-- \\1 -->#', '\\2', $text);
return html_entity_decode($text, ENT_QUOTES);
}