/**
  * Renders the rich text editor.
  * @param string $name
  * @param string $value
  */
 function Render($name, $value = '')
 {
     $baseUrl = $this->baseUrl;
     $grantResult = $this->guard->Grant(Action::UseIt(), $this);
     $disabled = (string) $grantResult != (string) GrantResult::Allowed();
     $_SESSION['KCFINDER']['disabled'] = $disabled;
     $_SESSION['KCFINDER']['uploadURL'] = $this->uploadUrl;
     $_SESSION['KCFINDER']['uploadDir'] = $this->uploadDir;
     $oCKeditor = new \CKEditor();
     $oCKeditor->basePath = IO\Path::Combine($baseUrl, 'ckeditor/');
     $oCKeditor->config['skin'] = 'v2';
     $oCKeditor->config['filebrowserBrowseUrl'] = IO\Path::Combine($baseUrl, 'kcfinder/browse.php?type=files');
     $oCKeditor->config['filebrowserImageBrowseUrl'] = IO\Path::Combine($baseUrl, 'kcfinder/browse.php?type=images');
     $oCKeditor->config['filebrowserFlashBrowseUrl'] = IO\Path::Combine($baseUrl, 'kcfinder/browse.php?type=flash');
     $oCKeditor->config['filebrowserUploadUrl'] = IO\Path::Combine($baseUrl, 'kcfinder/upload.php?type=files');
     $oCKeditor->config['filebrowserImageUploadUrl'] = IO\Path::Combine($baseUrl, 'kcfinder/upload.php?type=images');
     $oCKeditor->config['filebrowserFlashUploadUrl'] = IO\Path::Combine($baseUrl, 'kcfinder/upload.php?type=flash');
     foreach ($this->config as $key => $val) {
         $oCKeditor->config[$key] = $val;
     }
     ob_start();
     echo '<div class="phine-cke">';
     $oCKeditor->editor($name, $value);
     echo '</div>';
     return ob_get_clean();
 }