1.使用zend_form建立一個textarea
class Form extends Zend_Form
{
public function __construct()
{
parent::__construct();
$this->setName('form');
$description=new Zend_Form_Element_Textarea('description');
$description->setLabel('內容');
$this->addElements(array($description));
}
}
{
public function __construct()
{
parent::__construct();
$this->setName('form');
$description=new Zend_Form_Element_Textarea('description');
$description->setLabel('內容');
$this->addElements(array($description));
}
}
2.然後建立fckeditor,將textarea replace.
<script type="text/javascript" src="'/fckeditor/fckeditor.js"></script>
<script type="text/javascript">
var editor = new FCKeditor('description') ;
editor.BasePath = '/fckeditor/';
editor.ReplaceTextarea() ;
</script>
<script type="text/javascript">
var editor = new FCKeditor('description') ;
editor.BasePath = '/fckeditor/';
editor.ReplaceTextarea() ;
</script>
沒有留言:
張貼留言