getAttribute('id'); //var_dump($id); $this->_persistantFreeze = true; $this->_type = 'html_editor'; $editor = Container::getHtmlEditor(); if ($editor) { $this->editor = $editor; $this->editor->setTextareaId($id); $this->editor->setName($name); $this->editor->processConfig($config); } } /** * Return the HTML editor in HTML. * * @return string */ public function toHtml() { if ($this->editor) { if ($this->editor->getConfigAttribute('fullPage')) { $value = $this->getValue(); if (strlen(trim($value)) == 0) { // TODO: To be considered whether here to add // language and character set declarations. $value = ''; $this->setValue($value); } } } if ($this->isFrozen()) { return $this->getFrozenHtml(); } else { $styleCss = $this->editor->getConfigAttribute('style'); $style = false; if ($styleCss) { $style = true; } return $this->buildEditor($style); } } /** * Returns the html area content in HTML. * * @return string */ public function getFrozenHtml() { return Security::remove_XSS($this->getValue()); } /** * @param bool $style * * @return string */ public function buildEditor($style = false) { $result = ''; if ($this->editor) { $value = $this->getCleanValue(); $this->editor->setName($this->getName()); $this->editor->setTextareaId($this->getAttribute('id')); if ($style === true) { $result = $this->editor->createHtmlStyle($value); } else { $result = $this->editor->createHtml($value); } } return $result; } }