Ejemplo n.º 1
0
 /**
  * Return the HTML editor in HTML
  * @return string
  */
 public function toHtml()
 {
     $value = $this->getValue();
     if ($this->editor) {
         if ($this->editor->getConfigAttribute('fullPage')) {
             if (strlen(trim($value)) == 0) {
                 // TODO: To be considered whether here to be added DOCTYPE,
                 // language and character set declarations.
                 $value = '<html><head><title></title></head><body></body></html>';
                 $this->setValue($value);
             }
         }
     }
     if ($this->isFrozen()) {
         return $this->getFrozenHtml();
     } else {
         $styleCss = $this->editor->getConfigAttribute('style');
         if ($styleCss) {
             $style = true;
         } else {
             $style = false;
         }
         return $this->buildEditor($style);
     }
 }