public function convert(ElementInterface $element)
 {
     $text = $element->getValue();
     $tag = $element->getTagName();
     $bbcode = '[' . $tag . ']' . $text . '[/' . $tag . ']';
     return $bbcode;
 }
 public function convert(ElementInterface $element)
 {
     $href = $element->getAttribute('href');
     $text = $element->getValue();
     $bbcode = '[url=' . $href . ']' . $text . '[/url]';
     return $bbcode;
 }
 /**
  * @param ElementInterface $element
  *
  * @return string
  */
 public function convert(ElementInterface $element)
 {
     // If strip_tags is false (the default), preserve tags that don't have BBCode equivalents,
     // such as <span> nodes on their own. C14N() canonicalizes the node to a string.
     // See: http://www.php.net/manual/en/domnode.c14n.php
     if ($this->config->getOption('strip_tags', false)) {
         return $element->getValue();
     }
     return html_entity_decode($element->getChildrenAsString());
 }
 public function convert(ElementInterface $element)
 {
     $text = $element->getValue();
     $tag = $element->getTagName();
     if ($tag == 'ul' || $tag == 'ol') {
         $bbcode = "[list]{$text}[/list]";
     } else {
         $bbcode = "[*]{$text}";
     }
     return $bbcode;
 }
 public function convert(ElementInterface $element)
 {
     $text = $element->getValue();
     $size = $element->getAttribute('size');
     $color = $element->getAttribute('color');
     $bbcode = $text;
     if ($size) {
         $bbcode = "[size={$size}]{$bbcode}[/size]";
     }
     if ($color) {
         $bbcode = "[color={$color}]{$bbcode}[/color]";
     }
     return $bbcode;
 }
 public function convert(ElementInterface $element)
 {
     $src = $element->getAttribute('src');
     $bbcode = "[img]{$src}[/img]";
     return $bbcode;
 }
 public function convert(ElementInterface $element)
 {
     $text = $element->getValue();
     $bbcode = '[p]' . $text . '[/p]';
     return $bbcode;
 }