<?php
/*--------------------------------------------------------- 
 * File:fckeditor.php
 * Author:Tomix
 * Description: 
 * Created:2009
 * -------------------------------------------------------
 * Modified history:
 * -------------------------------------------------------
 * Copyright:
 * -------------------------------------------------------
 */
 require_once dirname(__FILE__)."/fckeditor/fckeditor.php";
 class fckeditor
 {
 	public $width="100%";     //編輯器寬度
 	public $height="300px";   //編輯器高度
 	public $value;            //編輯器值
 	
 	public $instance=null;
 	public function fckeditor($instanceName)
 	{
 		$this->instance= new _FCKeditor($instanceName);
		$this->instance->InstanceName = $instanceName;
 		$this->instance->BasePath = "/controls/fckeditor/" ;   
		$this->instance->ToolbarSet = "Default" ;
 	}
 	
 	public function getContent()
 	{
		$this->instance->Width = $this->width;
		$this->instance->Height = $this->height;
		$this->instance->Value=$this->value;
		return $this->instance->CreateHtml();
 	}
 	
 	public function render()
 	{
 		echo $this->getContent();
 	}
 }
?>