目录放置在
index.php
---js
---fckeditor
控制器中写入以下内容
public function AddAction()
{
Zend_Loader::loadFile('fckeditor_php5.php','./js/fckeditor');
$sBasePath = WWWROOT.'js/fckeditor/';
$oFCKeditor = new FCKeditor('FCKeditor') ;
$oFCKeditor->BasePath = $sBasePath ;
$oFCKeditor-> Height = 450 ;
//通过create方法,返回html内容,不是echo
$this -> view -> fckeditor = $oFCKeditor->Create();
}
还得修改fckeditor目录下的fckeditor_php5.php中的代码
fckeditor类中
function Create()
{
echo $this->CreateHtml() ;
}
修改成以下
function Create()
{
return $this->CreateHtml() ;
}
再通过视图输入
<?php echo $this -> fckeditor; ?>
要取得编辑器中的内容JS是
var ōEditor = FCKeditorAPI.GetInstance('FCKeditor');
var content = oEditor.GetHTML()
content就是编辑器中的内容
还有就是在fckeditor目录下放一人.htaccess文件。关闭重写引擎
RewriteEngine Off
index.php
---js
---fckeditor
控制器中写入以下内容
public function AddAction()
{
Zend_Loader::loadFile('fckeditor_php5.php','./js/fckeditor');
$sBasePath = WWWROOT.'js/fckeditor/';
$oFCKeditor = new FCKeditor('FCKeditor') ;
$oFCKeditor->BasePath = $sBasePath ;
$oFCKeditor-> Height = 450 ;
//通过create方法,返回html内容,不是echo
$this -> view -> fckeditor = $oFCKeditor->Create();
}
还得修改fckeditor目录下的fckeditor_php5.php中的代码
fckeditor类中
function Create()
{
echo $this->CreateHtml() ;
}
修改成以下
function Create()
{
return $this->CreateHtml() ;
}
再通过视图输入
<?php echo $this -> fckeditor; ?>
要取得编辑器中的内容JS是
var ōEditor = FCKeditorAPI.GetInstance('FCKeditor');
var content = oEditor.GetHTML()
content就是编辑器中的内容
还有就是在fckeditor目录下放一人.htaccess文件。关闭重写引擎
RewriteEngine Off