_persistantFreeze = true; $this->_type = 'CKeditor'; // set editor height smaller if schema defines rows as 4 or less if ( is_array($attributes) && array_key_exists( 'rows', $attributes ) && $attributes['rows'] <= 4 ) { $this->height = 175; } } /** * Add js to to convert normal textarea to ckeditor * * @access public * @return string */ function toHtml() { if ($this->_flagFrozen) { return $this->getFrozenHtml(); } elseif (!$this->getAttribute('click_wysiwyg')) { $elementId = $this->getAttribute('id'); $config = CRM_Core_Config::singleton( ); $browseUrl = $config->userFrameworkResourceURL . 'packages/kcfinder/browse.php'; $uploadUrl = $config->userFrameworkResourceURL . 'packages/kcfinder/upload.php'; $html = parent::toHtml() . ""; return $html; } else { $elementId = $this->getAttribute('id'); $plain = '
' . $this->getFrozenHtml() . '
' . parent::toHtml(); $config = CRM_Core_Config::singleton( ); $browseUrl = $config->userFrameworkResourceURL . 'packages/kcfinder/browse.php'; $uploadUrl = $config->userFrameworkResourceURL . 'packages/kcfinder/upload.php'; $html = $plain . ""; return $html; } } /** * Returns the htmlarea content in HTML * * @access public * @return string */ function getFrozenHtml() { return $this->getValue(); } } ?>